SilverBullet, Silverlight

SilverBullet #13 – System.Threading.SynchronizationContext

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 writing the demo for the code-camp  I ran into issues getting back on the UI thread after calling a webservice. The call to the webservice was made from the UI thread, but the callback was made on a different thread. The System.Threading.SynchronizationContext class held the solution.   The System.Threading.SynchronizationContext class…

SilverBullet, Silverlight

SilverBullet #12 – System.Windows.Browser.HttpUtility

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. This time I would like a little helper class to your attention. When working in a web environment ever so often you need to encode/decode a Url or a piece of Html. In Silverlight you need to look for the System.Windows.Browser.HttpUtility class. The static System.Windows.Browser.HttpUtility class contains 4 static methods. A…

SilverBullet, Silverlight

SilverBullet #11 – SyndicationFeed

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. Occasionally it’s required to use an Rss or an Atom feed in your projects. Just to show some news, or the latest update on the stock exchange. Working with these, often large, chucks of xml directly can be a pain. In Silverlight 3 (and .NET 3.5 and 4)  the System.ServiceModel.Syndication.SyndicationFeed class…

SilverBullet, Silverlight

SilverBullet #10 System.Windows.Documents.Run

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 showing text to a user it’s often necessary to show a few words in Italic or Bold. To do this, use the System.Windows.Documents.Run class. This class provides a small bit of HTML – like features inside a Silverlight TextBlock. But, instead of using HTML tags you have to use the…

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…

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…

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.…

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…