silverlight

Using static objects in XAML that were created in code in Silverlight

I couldn't get this to work in Silverlight, so I created two test projects. One simple WPF project and one simple Silverlight project that both do only one thing: set a public static readonly variable in code, and use it in a completely bare bones XAML. In WPF, works without a hitch. In Silverlight, I get the following compiler warni...

Silverlight and push notifications

I am creating a Silverlight 2 user interface to a remote instrument. There are two concurrent users at different sites interacting with the instrument (operator at the instrument and remote scientist) and any number of observer users not interacting with it, just watching. However, whenever one of the two active users changes something t...

Silverlight MVVM linking model and view model

There are lots of great examples around on MVVM but I'm still confused. Lets say you have a CustomerModel and a CustomerViewModel. It seems there would be a Name property on the CustomerModel and one on the CustomerViewModel. The setter on the CustomerViewModel will set the CustomerModel Name property and then call the OnPropertyChange...

Silverlight MVVM header detail

So lets say i have an OrderModel and an OrderViewModel. I have the Supplier, Order Date, etc properties on both the ViewModel and the Model and they are linked up. Seen examples on this and seems straighforward enough, although somewhat duplicated in terms of writing setters/getters. Now what do I do with the OrderDetails? In my model I...

How do you measure the performance of your Silverlight applications?

What are some tools/practices used to measure performance with Silverlight? I am interested in the performance costs of rendering certain xaml objects as well as algorithms I have written. I was about to start writing my own classes for this, but I thought I would ask here first. Thank you in advance. ...

How to manually add data to a DataGrid in Silverlight

I have found that datagrid columns can be dynamically created and bound in Silverlight. However I can't find a way to bind data to those columns. If I try to bind any type of object with AutoGenerateColumns = true, then the names of each property of the object get added as columns and the object information is displayed in the grid in a...

how to implement 3D image manipulation using Silverlight?

hello, i want to implement 3D image manipulation(i.e., image edit,re-size,rotate,zoom-in & zoom-out). please give me your ideas as soon as possible. ...

Iterating a Silverlight DataGrid

In ASP.NET, one finds themselves often writing code like: foreach(DataListItem item in theDataList.Items){ MyUserControl foo = item.FindControl("myUserControl") as MyUserControl; foo.DoSomethingNice(); } In Silverlight, how can one iterate through the constituent controls of a DataGrid (or other collection bound control)? I w...

How to get the value of <PasswordBox in silverlight?

I am pretty new to Silverlight and just now realised that there is a passwordbox control in Silverlight 2. But there are not much articles about how to get the value from this control. Is it similar to TextBox control. Can I use the .text proprty to get the value (but intellisense does not show this property)? ...

3D Image manipulation(drag&drop,editing,rotation,resize,zoom in & zoom out)

hello, thanks for quick reply i am new to silverlight. i am learning basics of silverlight now. but i need to implement image rotation and drop&drop from one position to another position,editing,resize,zoom in & zoom out as soon as possible. Can you just explain image rotation,drag&drop with corresponding code samples. Please as soon as ...

3D image (drag&drop,editing,rotation,resize,zoom in & zoom out) using silverlight

Hello, i am new to silverlight, learning basics now. But i need to implement 3D image manipulation(drag&drop,editing,rotation,resize,zoom in & zoom out). Please explain with corresponding code samples,attachments . Please as soon as possible. ...

Binding images to Image in Silverlight 2

I'm building a Silverlight 2 application and I need to bind some images to Image object declarated in XAML. I'm doing some other binding in the application and it works just fine, I'm having problem with only images! This is it's XAML: <Image Source="{Binding Path=ThumbNail}" Style="{StaticResource ThumbNailPreview}" /> And this is t...

NetDataContractSerializer equivalent for Silverlight?

Has anyone developed or know of a place where I could find a Silverlight implementation of NetDataContractSerializer? This WCF and Silverlight Comparison states that Silverlight does not ship with an implementation of NetDataContractSerializer. I'm hoping to avoid developing one myself. Thanks! ...

Serialization of objects using WCF and Silverlight

Is there a way to hook into how specific types are serialized when using WCF and Silverlight. For example, I need to tweak how System.DateTime properties are serialized/deserialized. ...

Object integrity and caching in a stateful client

I'm wondering what strategies exist to handle object integrity in a stateful client like a Flex or Silverlight app. What I mean is the following: consider an application where you have a Group and a Member entity. Groups contain multiple members and members can belong to multiple groups. A view lists the different groups, which are laz...

Making a XAML file internal in .Net

In my Silverlight project, I would like to make an assembly which contains .xaml that can't be seen from outside of the assembly. However, there is no clear way I can do this. When I modify the access modifier on the .xaml.cs file, the compiler tells me: Partial declarations of "My xaml class here" have conflicting accessibility modifie...

How I can implement sync calls to WCF services in SIlverlight?

Hi! Sometimes I need to call WCF service in Silverlight and block UI until it returns. Sure I can do it in three steps: Setup handlers and block UI Call service Unblock UI when everything is done. However, I'd like to add DoSomethingSync method to service client class and just call it whenever I need. Is it possible? Has anyone re...

MVVM - what should contain what... what should create what

I'm having a right barney getting my head around how everything fits together using the MVVM pattern. It all seems quite simple in practice but trying to implement it I seem to be breaking various other rules that I try to code by. Just as a side note, I'm trying to implement the pattern using Flex, not Silverlight or WPF, so if anyone...

Prism 2 SL : Remove View from Region when button clicked

I am new to Prism and I am trying to determine a best practice for deactivating a view in a Prism 2 application -- when a user clicks a button on the view I want to deactivate the view. The view is executing a command when the button is clicked. The view model is receiving the command but the viewmodel does not have a reference to the ...

Silverlight 2: Want a variable number of items to take up a fixed width.

The stackpanel is not co-operating. We have a fixed width, and a variable number of items to lay out left-to-right inside it. We have a an items control that lays them out with a stack panel: <ItemsControl x:Name="testItems" HorizontalAlignment="Left" VerticalAlignment="Top"> <ItemsControl.ItemsPanel> ...