silverlight

Is there a recommended approach to share state between screens in Blend 4 Sketchflow?

I am developing a Sketchflow prototype in Blend 4 and I need to share some state across the entire app - for instance - the currently selected item on screen 1. I looked at using a Datastore but it can only store simple types (strings, booleans,etc.) I want to store an entire object in there and then databind to it from other screens. I...

Getting UI virtualization working with ItemsControl in Silverlight

I'm trying to create a scrolling list of fairly large textblocks. I want there to be a vertical scrollbar to show them all, and if they overflow a certain size I want them to display an ellipsis. I actually have all this working pretty good. I have the following Silverlight XAML: <Grid x:Name="LayoutRoot" MaxWidth="500" MinWidth="100...

Better suggestion for external config file

I am currently using xml as a config file for my silverlight application. I have no problem reading the file, but now that I also require to update the file through web(preferably silverlight as will show preview of font colors, size etc), the only method I thought of is to generate the whole file and overwrite the existing through uploa...

How to remove a custom item from a listBox and ObservableCollection when click on a button

I have the listBox and a ObservableCollection. The listBox.ItemSource (listNotify.ItemSource) is set to that ObservableCollection (errosList). The problem that i have is that i don`t know how to remove the correct element from errorsList when the user click on the button with content x from listBox. For the item of the listBox i use a I...

Silverlight in asp.net?

If I need to build a silverlight application and have it work under my asp.net application! Does that mean I have to create two different vs projects? One for silverlight the other my asp.net application? Or I can have one in 1? What do I do? Sorry if this is a silly question.. Thanks ...

WCF RIA Services, SL4

After I edit an entity and save it, how do I reload the datasource to refresh the entities? I have a listbox with entities, and after I edit the entities the datasource is still showing the old information. the MyEntityDataSource.Load() method is not working. The problem arises because I am not navigating to a separate page to do the ed...

WP7 Have the enter key send text from textbox to a textblock.

Hey guys, the following tutorial shows how to take the text from a text box and display it in a text block when the user hits a button. Simple enough... but what I want to do is instead of hitting a button that adds the text I want the enter button to do it. Searching here, I found the following code but it doesn't seem to do anything. ...

Windows Phone 7: Title bug on back button, and de-selecting listbox entries

Hey there, In Windows Phone 7 (Silverlight), when I use the back button to return to the previous page, the page title does not update and remains the same as the page that was just left. The actual text is bound to a string in a viewmodel, nothing special there. Here is the line of xaml. <TextBlock x:Name="CategoryPageTitle" Text="{Bi...

MSBuild: How do I create and use a Task to convert Content items at build time?

I have a Silverlight 3 project with something like this: <ItemGroup> <Content Include="Content\image1.png"> </Content> </ItemGroup> Basically I've added a PNG file to my project and set its build action to "Content". This works nicely. Now what I'd like to do is be able to add images in a different format to my project, and have ...

Why can I not bind the Visiblity of a DataGridTemplateColumn in Silverlight 4?

It seems that it is not possible to bind the visibility property of a DataGridTemplateColumn in Silverlight 4 still. I did some Googling and there seem to be a few posts suggesting it was to do with the fact that it was not a DependencyObject and how this would change in SL4 but it does not seem to be the case. To work around it, I do i...

MVVM Light : RelayCommand : reuse the command or create a new instance ?

When defining a RelayCommand in the ViewModel, this is normally done using once [lazy or in constructor] (see here for examples). But is this safe ? What if multiple RelayCommands from the same instance are queued (multiple clicks from same button on the GUI), and for the first command the 'CanExecute' is changed to false, will the othe...

Extending WCF Interface with Plugins

I'm building an application with a Silverlight frontend that communicates with a backend service via WCF. My service has an interface that handles all of the core communication with the frontend. The backend can be extended with various plugins and I plan on loading custom silverlight modules for configuring these plugins with prism....

DataGridColumn Binding in code

Does anyone know how I can do the equivalent XAML binding in code? <DataGrid ... > <DataGrid.Columns> <DataGridTextColumn Binding="{Binding Description}" <=== set in code ** /> </DataGrid.Columns> </DataGrid> Cheers, Berryl === UPDATE ==== It looks like the method I have been looking for is Da...

How to keep reference between two projects when making a template in Visual Studio 2010

I have a solution with 3 projects and i have a reference between two of the projects and a reference to a .dll from a project in all 3 projects. The project are in Silverlight. I want to make a multi-project template and when i create a new project from that template the references doesn't work anymore. It make the modification to the na...

Silverlight DataPager breaks VS designer

I'm experimenting with the Silverlight 4 SDK DataPager. I have some code in my XAML that looks like this: <sdk:DataPager x:Name="dataPager1" PageSize="100" /> As SOON as I paste that into my XAML the designer breaks with this odd message: Error HRESULT E_FAIL has been returned from a call to a COM co...

TCP or Generic Handler/ Web service

I have a program, lets call it program ABC. This program talks to a dll and return a message. For my silverlight app, I will need to talk to this program, and receive the message. I will have different amount of silverlight clients talking to the program at the same time. It ranges from usually 10 to 100. I am currently using TCP to co...

silverlight plugin dump file

I like to know if anyone has any idea to make silverlight generate a dump file or something to allow me to know the cause of the plugin crash? I have recently asked this question and was given a solution (refer to the link below). But using the method, I do only see the minidump folder with nothing inside, no matter how I try to crash m...

Looking for a (free) Silverlight treelist / treegrid control (multi-column treeview)

I am looking for a Silverlight 4 treelist / treegrid control (multi-column treeview; not a simple treeview). There is one at Codeplex: http://multicolumntreelist.codeplex.com, but unfortunately it is under GPLv2 and this is not applicable for me. Does anybody knows alternatvies for that? ...

SilverLight - A way to find which property caused the update to the model

Hi, I've got an MV-VM based SL dialog that seems to fire up a property in the model which I cannot find where it's been triggered from. When debugged the Stack Trace show it as external code. I feel it is the control itself causing a couple of updates for 1 click to the model with wrong data but not extactly sure why since the control (r...

TextBox.TextChanged event firing twice on Windows Phone 7 emulator

I have a very simple test app just to play around with Windows Phone 7. I've just added a TextBox and a TextBlock to the standard UI template. The only custom code is the following: public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); } private int counter = 0; p...