SilverBullet, Silverlight

SilverBullet #9 – System.Windows.Analytics

I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. When developing applications, especially graphic intensive web applications you want to monitor the performance when running. The System.Windows.Analytics class can help you with that. The class has no methods of any significance and only three read-only properties: AverageProcessLoad – shows the average of all cores on how much of the CPU…

SilverBullet, Silverlight

SilverBullet #8 – Accessing local files

I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe.   Although the Silverlight security model prevents access to the local file system, it is very easy to open and save or import and export files to and from the file system. It is not possible to gain any information about the local file system, but the Silverlight framework can give…

wpf

Monitoring routed events in WPF

A few days ago I wanted to monitor all routed events fired in my application. Because I am running an XBAP application inside a browser windows, Snoop wasn’t very helpful (it usually is). Because all routed events are basically the same, you can handle them all with one singe event handler. Using the EventManger it is possible to get all routed events and register a class handler for every one of them. The code below is a stripped down version of the code I’ve got implemented. When loaded, it gets all events. Than it loops to them and assigns a…

SilverBullet, Silverlight

SilverBullet #7 – System.Windows.Messaging

I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. Most often Silverlight applications take up the whole screen and the page that is hosting the application contains only one control. It is possible to split you application into smaller controls. This can be valuable when you are using silverlight 3 in SharePoint parts, or just to leverage your webpage with…

Expression Blend

9 little new things in Expression Blend 3

When working on some projects and articles in Expression Blend 3 I noticed a few differences with Blend 2 right away. Here are 9 improvements and new features I really like or enjoy having now. 1. Expression Blend now shows the size of your controls even when the width and height are set to Auto: 2. The assets are placed in a panel now. Although the “old” way of working with asses is still available, this new panel can be left open. Beside that, the assets are grouped in different ways in a tree, which makes them very easy to…

SilverBullet, Silverlight

SilverBullet #6 – System.Windows.EventTrigger

I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. There are situations when you would like to start an animation as soon as your application is loaded. The EventTrigger class is what you need in that case. You may know this class from WPF, but the Silverlight version is very limited. The nice thing about this class is that it…

SilverBullet, Silverlight

SilverBullet #5 – System.Windows.ApplicationServiceContext

I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe.   When running Silverlight outside the browser, there’s the possibility that the computer that is running the applications is disconnected. This is where the System.Windows.ApplicationServiceContext class comes in. This class represents the initial state when the application is started. It has no methods of any significance, only two read only properties.…

Expression Blend, Silverlight

Styling a TreeView in Silverlight 3 and Blend 3

Introduction Today I would like to show you how to style a TreeView control in Silverlight 3 using Expression Blend 3. The TreeView is a control to visualize hierarchical data structures. If you haven’t got Silverlight 3 and Blend 3, you can find all downloads for Silverlight 3 and Blend 3 here. The TreeView control is available in WPF natively and styling is only a small bit different than in Silverlight. I try to explain one way of doing this and there are others. If you have any questions what so ever or suggestions for other tutorials, please let me…

SilverBullet, Silverlight

SilverBullet #4 – System.Windows.ApplicationIdentity

I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe.   One of the great new features of Silverlight 3 is the so called “Out of Browser” support. This means you can run your application without the browser, but still using the browser secure sandbox. The ApplicationIdentity class can be used to provide some extra information about your application when running…

SilverBullet, Silverlight

SilverBullet #3 – System.Windows.Input.FocusManager

I’d like to provide you with a SilverBullet™, a small snippet of Silverlight, a class or namespace hidden in the silverlight .NET framework, to help you out in times of need. It’s not to learn, but something to keep in your pocket. Just remember it’s there and you’re safe. There are situations where you want to know which UI element has focus. One way of doing this is handling the GotFocus and LostFocus events. These events are only raised when an element gets or looses focus, and are handled asynchronously.  When you want to know what element has focus in…