silverlight

How to do smooth Alpha chanel keying with Silverlight 3 Pixel Shaders?

How to do smooth Alpha channel keying with Silverlight 3 Pixel Shaders? I want some HLSL filter (like this Shazzam HLSL example) sampler2D implicitInputSampler : register(S0); float4 main(float2 uv : TEXCOORD) : COLOR { float4 color = tex2D( implicitInputSampler, uv ); ...

Silverlight, Unity and INotifyPropertyChanged

I'm starting a new Silverlight project at the moment, and I'm having issues where by Unity is throwing an exception if my ViewModel (which it is instantiating for me) contains the RaisePropertyChanged event. I looks like this: public class AddNewClientViewModel : ViewModelBase { private Visibility _extraClientFieldsVisible; pu...

Silverlight Binding

I've a Silverlight page using a MVVM behind it to handle all the data bits going on. The data context is set for the page using: DataContext="{Binding AddNewClientViewModel, Source={StaticResource ServiceLocator}}" ServiceLocator being a service that allows me to create and inject the appropriate VM using an IoC container. This all ...

Silverlight control layout update in runtime

Hi, I have a silverlight control that has a few element such as: Image, TextBox and a TextBlock. The application shows a list of the same control and the controls are placed in a specific layout, in grid with rows and cols. Now, I would like to be able to modify all the controls layout and arrange the element differently (preferred ...

Is developing Silverlight free, and will it stay that way?

As far as I can tell developing for Silverlight is free as long as you already have Visual Studio 2008. Does anyone know if MS has any plans to change that? ...

How do I programmatically position a canvas in Silverlight?

I'm using Silverlight 3/C#, and I'm trying to create some XAML objects programatically in response to a user clicking on a button. However, I can't seem to position a Canvas object that I have created - when I call SetValue() on the new Canvas with the Canvas.LeftProperty value, the browser window clears to an empty screen. I have a si...

Resize an Uploaded Image in Silverlight 3

Hi, I'm trying to resize an image in Silverlight 3 that has been submitted by a user via the OpenFileDialog control. I can grab the contents of the file and put it into a WriteableBitmap object and then display it on the screen just fine into an Image control. The Image control will even resize it to fit the size of the image control for...

Render List<Canvas> as list items (or itemscontrol)

I've effectively got a List or a List, XAML that represents the canvas elements... as a return from some stuff I have no control of. I've been moderately successful rendering via stackpanel.children.add etc, however want to start having the list of canvas within a virtualizing panel or list. I've set itemssource and datacontext on the...

Prism's ItemsControl seems to have a xaml parse error. Why?

I am at a loss as to why my Shell.xaml's ItemsControl is causing a parse error. I know the syntax is correct because I copied the Silvelright project files from a working project. Right now my only guess is that ItemsControl is dependent on something else. Here is the relevant xaml line for ItemsControl. <ItemsControl x:Name="Region" ...

AppDomain.GetData method not accessible?

I am developing a Silverlight 3 application and I would like to delegate all unexpected error handling in a single instance of a class I have named ErrorHandler. This class has one method named HandleApplicationException, plus a couple of other methods to handle more specialized errors. In my application I am using Unity for dependency ...

Storing key-value pair settings in silverlight

I have a class in silverlight that I would like to store to disk. It contains a couple of basic CLR objects - strings and integers, and a WPF BitmapImage. What is the best way to store this to a file? I have tried serializing the class and dumping it to file, but BitmapImage does not support serializing. Ideally, I want to store the bi...

Silverlight 3 XamlReader Exception not caught

Hi, when I use XamlReader.Load() with an invalid XAML string, the resulting XAMLParseException is not caught although beeing in a try-catch-block: try { UIElement xamlCode = XamlReader.Load(XamlText) as UIElement; } catch (Exception ex) { ErrorText = ex.Message; } The code is called from the Tick-Event of a Disp...

WPF/Silverlight: data binding a datacontext to a property programmatically.

I've got some code which sets up a datacontext. Often enough, the datacontext should be set to some underlying data collection, such as an ObservableCollection - but occasionally I'd like to set it to a collection that is itself a dependency property. This can be done in xaml, but doing so defeats the purpose, which is to share the UI ...

silverlight 3 collection binding

Someone please help me understand why this binding does not work... I have a class called SelectionManager with a property called 'dates' which is populated by a WCF service. The property is an array of structs which bundles a DateTime and an integer count of business objects. public class SelectionManager : INotifyPropertyChanged {...

Silverlight ListBox always highlights first item upon selection

I have a ListBox being populated in code. Each item is a simple text/url combination and when an item is selected, it should redirect to the selected item's URL. That is working as expected, but I'm having an issue with the selection of the item in the ListBox. It seems that no matter which item you selected, the first item in the Lis...

.Net Ria Services Deployment

I am having difficulty deploying RIA services/Silverlight 3 to a staging environment. Here is my situation: 1) I am using RIA for authentication. This works fine on both my development machine and in the staging environment. 2) I created a custom LinqToEntities RIA service to get data from the database into my application. This servi...

Is there an AOP solution for Silverlight?

I see that there is PostSharp AOP support for Silverlight, but is there a product that works like the Castle DynamicProxy library, but in Silverlight? ...

Data not coming through from RIA Services in Silverlight

I had a connection working but something changed and now the data isn't showing up. It is a simple query that worked before that just returns all entities. I put in break points on the LoadOperation call and it fires and gets 0 entities. I also put a break point on the service itself, and it does not break before the LoadOperation eva...

WCF Error: "The given key was not present in the dictionary." on initializing client proxy

I am getting the following error: "The given key was not present in the dictionary." The code is just trying to create a proxy client connection: FileService.FileServiceClient svc = new CCS.FileService.FileServiceClient(); Stack Trace: at System.ThrowHelper.ThrowKeyNotFoundException() at System.Collections.Generic.Dictionary`...

How to access Dispatcher in Silverlight tests?

I am using the SL unit test framework for tests (http://code.msdn.microsoft.com/silverlightut). My code is heavily client-server communications dependant, and I access the GUI dispatcher in several places to make sure important data is only accessed on a single thread (ie. the GUI thread). This dispatcher seems unavailable in the unit t...