silverlight-4.0

Silverlight error message [Arg_VersionString]. Don't know where to begin.

One of the users of a silverlight app I wrote gets this error message: [Arg_VersionString] Arguments: Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=4.0.50524.0&File=mscorlib....

TreeViewItem.ItemContainerGenerator.ContainerFromItem inconsistent results

Hi, I have a TreeView on my page. It's bound to a collection of clients containing contracts, like: public class Client { public int ClientID { get; set; } public string Name { get; set; } public List<Contract> Contracts { get; set; } } public class Contract { public int ContractID { get; set; } public int ClientID { get; s...

How to get user info from WebContext?

My SL app use windowes authentication. When app started, Following code add user info to colloection: public App() { InitializeComponent(); // Create a WebContext and add it to the ApplicationLifetimeObjects // collection. This will then be available as WebContext.Current. WebContext webContext ...

Insert / Update with RIA services Compositional Attribute

I am creating a Silverlight 4 application with Entity Framework, RIA Services and MVVM-Light toolkit. The application deals with a complex object graph, that contains the following structure: Job 1->* Resources Job 1->* Workplans Workplan 1->* WorkplanItems Resource 1->* Assignment WorkplanItems 1->* Assignment I would like to...

Preventing stale xap files from being served by MEF DeploymentCatalogs

Hello, In the past I had problems with the browser cache serving older versions of the xap file. In order to overcome this I dynamically add a query string parameter containg the last modified date of the xap file to the silverlight source parameter in aspx page. This guarentees that clients will receive the latest xap file and not a ca...

Making a silverlight UserControl fill the space available within content control

I have various user controls that get placed in a content control within my Silverlight App. At present I am hard coding the width and height of the controls to fill as they don't stretch. I have set the HorizontalAlignment and VerticalAlignment to strecth (on the usercontrol and DataTemplate), but they still don't fill the space availab...

Merge Assemblies in Silverlight

Hi, I'm trying to create a custom Control using a silverlight Class Library that inherits from an 3rd party control(like telerik radcontrols), and when I add my class library dll to another project, and try to use my custom Control an error occurs telling that the reference for the reference where the class that inherits with my contr...

Setting a Silverlight App to be WindowLess

I have downloaded the ComponentOne Silverlight controls, and am trying to add the HTMLHost control to one of my UserControls. When I run the App, I get the message To use this control the silverlight plugin must have its 'windowless' Property set to true Does anyone know how I set this property? ...

Why is the MSBuild task ResolveProjectReferences taking a really long time?

I have a Silverlight 4 solution that takes a really long time to build from both VS2010 and the MSBuild 4 command line. The solution contains 42 projects, one is a Silverlight application project, one web application project, and the rest are class libraries. The MSBuild diag summary shows these tasks are taking some considerable time....

Align Scrollbar to left of the Silverlight ListBox

The below is an image of a listbox with the listbox items present in it : I want the scrollbar of a listbox to be aligned on left side Edit After Hans answered : I tried what Hans said in my previous code was : <ScrollViewer x:Name="ScrollViewer" TabNavigation="{TemplateBinding TabNavigation}" FlowDirection="RightToLeft"> ...

Using XAML and Silverlight 4, is there a way to build up a dynamic GRID rows and columns from databinding?

I'm trying to have a regular grid rows and columns defined dynamically using databinding in XAML only. I know I can use code behind for this but I'm looking for a way to do it purely in XAML. Any thoughts? ...

Silverlight 4 Equivalent to WPF "x:static"

I'm working on a project that is based on an old project someone started and didn't finish. I was trying to use as much of their code as I could, so in doing so I ran into some tweaking issues. Namely, when I put some of the old xaml in the new project there were some errors that were thrown regarding the "x:static" property and "Dyna...

what's the best practice for events handling in MVVM

I am doing a silverlight using the MVVM model, and i am finding it hard to do the events handling via MVVM especially that the events handlers are doing lots of changes in the view like enabling and disabling buttons, update media element functions and position. I am still new to the MVVM and i can't Imagen how can i do this. does anyo...

Prevent webcam light from illuminating when accessing microphone in Silverlight 4

I'm writing a small audio recorder component in Silverlight 4. It works fine, but I've noticed that when I'm recording audio, the light on my webcam turns on indicating that the camera is active. While I know that I'm not doing anything insidious with the webcam, my users would have every right to be suspicious. Is it possible to tell ...

Silverlight: how to handle standard assemblies (part 2)

It is necessary to move 'standard' assemblies out of the xap-file (Silverlight 4 application). I had a similar problem (http://stackoverflow.com/questions/3329731/silverlight-how-to-handle-standard-assemblies) and got a good link with deep explanations. But not all is clear there. After I've switched on the 'Reduce XAP size by using app...

Silverlight: how to handle standard assemblies (part 3)

When Silverlight4 application is build the 'Microsoft.Practices.Unity.Silverlight.dll' assembly is not putting into a separated file zip-file, it is in the XAP-file instead. To be consistent, here are links to previous questions of the 'How to handle standard assemblies' topic: [http://stackoverflow.com/questions/3329731/silverlight-ho...

Is there any difference in x:name and name for controls in xaml file?

Hi, I am new in Silverlight. When I add some control to my xaml file with Visual Studio it set controls name with Name property, but there is also x:Name. Is there any difference and when to use each of them? Thanks. ...

Sample Silverlight 4 projects

Hi, I am looking to get my hands wet with Silverlight 4. I was wondering if someone can recommend a sample silverlight 4 project that I can do (home project) to get my confidence level up. Thanks in advance. ...

Silverlight Game Logic on client side or on server side?

I am running into some problems right now. I am developing a card game (Top Trumps) which is played by two players. I wonder how to best setup the architecture. Right now almost all of the game logic is calculated on client side. The game state is saved in a database table. The database is updated every second. But since two players a...

EventTrigger doesn't work on controls inside <sdk:Page.Resources>

i am using EventTrigger in silverlight application to handle some events through MVVM model, trigger is working fine on the layoutroot controls, but there are some controls inside the pages resources but the trigger is not working with them :( is there anything i should add or change the namespace or something ? here is my code <i:In...