silverlight-4.0

ObservableCollection with ObservableCollections not rendering correctly.

I am relatively new to the Silverlight experience and am trying to create a MVVM app with a DomainService that returns POCOs as the models. I have a UserControl that has a TreeView with the ItemsSource set to bind to an ObservableCollection of a type that has an ObservableCollection as one of it's properties, and that collection is of a ...

Can or should dataforms be nested

My VM looks something like this: public class PersonViewModel : ViewModelBase { public String Name { get; set; } public Phone HomePhone { get; set; } public Phone OfficePhone { get; set; } public Mailing HomeAddress { get; set; } } Of course the view model implements INotifyPropertyChanged and so the property setters i...

How do you handle validation severity in Silverlight 4?

With 4.0, Silverlight now supports INotifyDataErrorInfo but out of the box I can't seem to find anyway of specifying a severity (Error, Warning, Info) in order to be able to style the inputs differently (red, yellow, blue). How do you handle this? Is there anyway to tap into the mechanism that styles the inputs, or do you have to resort...

How do you restrict selection of cells to exclude a column in a DataGrid?

I have a datagrid based selection control that duplicates the Easing Function selector in Expression Blend. This is for the Easing Function project so you will also be helping yourself :) This selector is a permanent fixture on the screen, to make it easy to try out options, while still looking enough like the options you normally sele...

Silverlight datagrid: Why when I set SelectedIndex the RowDetailsVisibilityChanged does not fire?

although, the detail section (DataTemplate) does expand. Please advise. Thank you! Ricky ...

Silverlight DragDrop.DoDragDrop()

I am really struggling to get a simple drag and drop sample working in Silverlight 4. Here's what I have: XAML <UserControl x:Class="TestDragDrop.MainPage" Width="350" Height="200" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"&gt; <Grid Background="...

Two way binding between textbox from parent silverlight's page to another local silverlight user control's textbox.

I have used DependencyProperty to pass value from textbox at silverlight page to external silverlight user control located in same page and that works fine. But the problem is I could not bind the Textbox in page in reverse way. i.e. when i need to have changes in parent page when its usercontrol's textbox text is changed. The XAML: ...

Silverlight Sculpture generated application locking up on service calls (on some machines)

We have an application generated using the Sculpture software package. That means the project is roughly equivalent to the code in a Prism application. Part of their model is that all WCF Service calls are performed synchronously, but on background threads (actually they are async calls as well, but the Sculpture background thread metho...

How to load an aspx page from silverlight frame?

I have two frames in silver light application one frame contain treeview control. I want that when my user click on treeview node then aspx page is load on next frame. how can i achive it.. ...

How can I open an aspx page in a new browser window from a SilverLight Application?

Hi, I want to add a button to my user control in SilverLight 4.0 application which will open a new browser window with an aspx in it when it is clicked. How can I achieve this, can you please advice? Additionaly, can I lock the SL application until this new window is closed (Alike a modal dialog)? thanks! ...

Can I load type from Silverlight 4 class lib assembly into my .NET 3.5 based process?

By now when I attempt to var a = Assembly.LoadFrom("SL4ClassLib.dll"); var typeInstance = a.CreateInstance("ClassName"); I get FileNotFoundException, because no System.Runtime.Serialization Version=2.0.5.0 found. This assembly goes with SL 4 runtime. I can't add reference to it from my 3.5 app, cause it already has reference to Syste...

How to size a navigation page

Using the Silverlight Navigation Project template, I would like the content my Pages to be horizontally and virtically centered in the navigation frame, and not fill the whole space. For example, consider this piece of XAML placed Home.xmal view. What this results in is a rounded corner beige background that fills the whole frame with ...

Why would WebClient.OpenReadAsync return a e.Result of zero length if download is successful?

Using the following code (from a Silverlight 4 OOB app) I'm getting a result stream with a size of zero even though it takes the time to download the whole file (900+MB) and no error is reported. Fiddler also says the whole file was downloaded. The handler on progress changed (although not shown below) is hit and reports an increase in ...

Applying a Silverlight 4 Toolkit Theme to an Existing Business Application ?

Hi, I have created a new Silverlight 4 solution using the Business Application template. The requirement is to style the application and not use the generic template theme. I have installed the Silverlight 4 toolkit and like the BureauBlue theme. How do I apply the BureauBlue toolkit theme to the entire solution? That is, is there...

Using a Silverlight Hyperlink Button Style without the Navigation

In my page I want the button that looks like the HyperlinkButton (underline when MouseOver etc). But I want to handle the navigation in code (by using the Click event handler). So I'm using a HyperlinkButton and setting the NavigateUri to an empty string and setting the Click handler. But the problem is that the browser tried to dow...

Silverlight in browser UnitTesting Mock<FileInfo>

Hi All, I'm facing difficulties in Silverlight (inbrowser) UnitTesting using Mock to read a file into my ViewModel. It gives me an AccessDenied error message. Is there another alternative method for that kind of problem? My UnitTesting is DragAndDrop Image file in Silverlight 4. eg: unittesing.cs var fileInfo = new Mock(); ...

How to open a apsx page from SilverLight Application as a modal-dialog?

How can I call an aspx page from a SilverLight application, so that it opens in as a modal dialog and it blocks interaction with the SL application until the dialog is closed? Thanks ...

How to force AutoCompleteBox control to populate the ItemSource only after n chars are entered?

Is it possible to force AutoCompleteBox control in SilverLight application to start obtaining ItemSource data only after n chars are entered (the data with the filtering mode StartsWith? Thanks, Here is the way I bind my ItemsSources (Basically there is a comboBox which stands for Stetes. And once a state is selected I set itemsSource...

Record Silverlight 4 MediaElement content.

At the moment I'm working on a project. Which contains streaming from an IP camera to the Silverlight 4 MediaElement. The stream that goes through the MediaElement, needs to be cut when a button is clicked. So is it possible to record MediaElement's content on demand? When that's done, write the recorded part of MediaElement to disk. If...

DragAndDrop selectedItems of one silverlight Datagrid into another.

Currently I am using "DataGridDragDropTarget" to Drag a row from one datagrid to another, but a client want to be able to select multiple rows from one datagrid and drop them into another. I played around a bit but realized "DataGridDragDropTarget" seems to be able to drag and drop single row at a time only. Is there any alternative w...