Using Moq with Silverlight for Advanced Unit Tests

Moq is a library that assists with running unit tests by providing easily mocked objects that implement interfaces and abstract classes. You can learn more about Moq on their website. There is a distribution for Silverlight, and in this post I’ll focus on some ways to use Moq for some more involved testing scenarios. Download…

Microsoft Online Services: Very Cool (and Cheap!)

This is not a technical post, but one that bumps into business. Yes, occasionally us software developers have to lift our heads up and see that there’s more to life than hacking code. This is especially true at small companies, such as Wintellect, were the effort to do business means you can’t just hide in…

Programmatically Accessing the Live Smooth Streaming API

Live Smooth Streaming is a Microsoft technology that allows you to take a live, encoded, incoming video stream and rebroadcast it using Smooth Streaming technology. This technology multicasts the video stream in segments of varying bandwidths. This can then be played with a Silverlight-based client like the built-in MediaElement or more advanced player like the…

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…

Amazing .NET Reference Visualizations

Half the battle when tracking down memory problems in a .NET application is seeing the reference chain so you can see why an object is still in use. You can use SOS and its !gcroot command to track them down, but that can bring new definitions to tedious. If there were only away to see…

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…

Silverlight 4’s New Notification Windows

Silverlight 4 includes a slew of features designed to make out-of-browser applications richer. One of those features is notification windows, also known as “toast” windows. This feature is available to all OOBs, regardless of whether they are trusted. It is not available to applications that run inside the browser. A notification window is one that…