Introduction to Debugging Silverlight Applications with WinDbg

I’ve had a few users ask me about finding memory leaks and understanding what happens with references in Silverlight. One very powerful tool to use when debugging Silverlight applications is the Windows Debugging Tools. You can download the 32-bit (x86) version side-by-side with the 64-bit (x64) version. Both WPF and Silverlight ship with an extension…

Simple Dialog Service in Silverlight

I noticed on the forums there are a lot of users not comfortable with asynchronous programming who struggle a bit in Silverlight with getting their arms around the concept of a dialog box. In other environments, you can simply shoot out a dialog, wait for the response, and continue. In Silverlight, of course, the action…

New Silverlight 3 Version Released (3.0.50106.0)

A new version of Silverlight 3 has been released. You can download the latest control here. If you are a developer, then you’ll want to use the developer installer that is available here. This version fixes some issues related to hardware acceleration in the graphics processing unit (GPU), certain cases that cause Deep Zoom to…

Making Your Own 8K Homegrown Inversion of Control Container

If you develop software, chances are you you’ve worked with Inversion of Control containers and the Dependency Injection pattern. Many frameworks exist to address how to marry concrete implementations to abstract classes and interfaces. A few popular ones on the .NET platform include: Autofac Castle Windsor Managed Extensibility Framework (MEF) Ninject StructureMap Unity Download the…

Quick Tip: Embedding and Accessing Schemas in .NET

I have a project I’m working on that requires the use of some extensive XML manipulation. While XML can be very powerful, XML without a schema is like JavaScript objects: no strong typing and the wild west as far as standards are concerned. A good, solid XML document will have a valid schema to validate…

Auto-Discoverable Views using Fluent PRISM in Silverlight

One reason a developer would use a technology like MEF is to, as the name implies, make an application extensible through a process called discovery. Discovery is simply a method for locating classes, types, or other resources in an assembly. MEF uses the Export tag to flag items for discovery, and the composition process then…

Automated Silverlight Unit Testing Using StatLight

One concern with the Silverlight Unit Testing Framework is that it runs on a UI thread and requires a browser to function. This makes it difficult to integrate into automated or continuous integration testing. Difficult, but not impossible. A solution is provided by the project called StatLight which not only supports Silverlight testing automation, but…

Silverlight Unit Testing Framework: Asynchronous Testing of Behaviors

Last month, I bogged about Unit Testing ViewModels AND Views using the Silverlight Unit Testing Framework. I wanted to take that post a step further and talk about some more advanced testing scenarios that are possible. The site itself provides a lot of information about how to get started and what is available with the…

PRISM, MEF, and MVVM Part 3 of 3: Dynamic MEF Modules in PRISM

Series recap: PRISM, MEF, and MVVM Part 1 of 3: Unity Glue PRISM, MEF, and MVVM Part 2 of 3: Making PRISM MEF Friendly PRISM, MEF, and MVVM Part 3 of 3: Dynamic MEF Modules in PRISM In the final part of this series, I will show a dynamically loaded module (using PRISM) that takes…

PRISM, MEF, and MVVM Part 2 of 3: Making PRISM MEF Friendly

In the first part of this series, we explored using the Unity container to bind the view model to the view. The next logical step is to explore how to use MEF. PRISM provides several useful mechanisms that relate directly to views and modules, such as the region manager and the module manager. This allows…

PRISM, MEF and MVVM Part 1 of 3: Unity Glue

PRISM, also known as Composite WPF, has established itself as a very popular framework for building modular, scalable Silverlight applications. A newer contender, the Managed Extensibility Framework (MEF), has also grown in popularity. In fact, these two frameworks have left people scratching their heads wondering which one to use, when, how, and why. Download the…

Fractal Koch Snowflakes in Silverlight

So late last night I decided that since I spend most of the day writing software for other companies, it was time to build something for my daughter. I knew right away it would be snowflakes. I’m not much of a “graphic design” guy, but I do know math, so when I can lean on…