Posts Tagged ‘Silverlight’

Debugging a Memory Leak in Silverlight 4

Posted: 10th November 2010 by thegrayzone in Development
Tags:

The Problem I was having a bit of trouble with a memory leak somewhere in my Silverlight 4 application. There was nothing obvious in my code that was causing it, I was cleaning up and disposing of objects as I went. I then discovered the very handy WinDbg tool that comes as part of the [...]

Problem By default any binding for a TextBox is not updated until the field loses focus. This didn’t suit my needs for an application I’m currently working on because I wanted the Binding source to be updated whenever something is entered into the TextBox. With WPF this is done easily by setting the UpdateSourceTrigger property [...]

Binding to WebContext.Current in XAML

Posted: 6th October 2010 by thegrayzone in Development
Tags: ,

When using the RIA Services Business Application template in VS 2010 I noticed that the WebContext.Current object is added to the applications ResourceDictionary: private void Application_Startup(object sender, StartupEventArgs e) { this.Resources.Add(“WebContext”, WebContext.Current); … } As this is now stored as a resource you can easily bind to it, using the StaticResource extension. I’ve used it [...]

Change Opacity of Border on MouseOver

Posted: 8th September 2010 by thegrayzone in Development
Tags: ,

The Problem Recently I was looking for a way of changing the opacity of a Border control when the user mouse’s over it, and re-setting the opacity when the mouse leaves. I originally wanted to do it using VisualStateManagers but since there is no ControlTemplate this won’t work. The Solution The solution that I came [...]

I’ve recently been using the Silverlight Report Viewer from Perpetuum Software. It’s the only real tool for viewing report services reports in Silverlight. The Problem Their start up example stores the report URL and data source credentials inside the web.config file. I wanted to encrypt these for added security and I also had to supply [...]

The Problem One of the requirements for a Silverlight 4/WCF RIA Service application that I am working on is that the connection string is stored encrypted within the web.config file. This left me with the problem that I would need to somehow unencrypt the connection string and manually set it before any database interaction was [...]

Setting maximum object size in WCF

Posted: 2nd June 2010 by thegrayzone in Development
Tags: ,

I have recently been working on a Silverlight application that uses WCF for all data access functions. The application worked fine on my development machine but when I moved it over to a test environment I received the following, rather vague, error when making a few of the database calls: “The remote server returned an [...]