Sharing code between Silverlight and WPF using Build Targets

It’s no secret that Silverlight and WPF share a lot in common, primarily a result of their shared CLR Framework heritage. I have noticed a considerable increase in the number of organizations that are building applications that target both platforms. And in particular I have seen a rise in the number of organizations that are…

Yet another way to attach ViewModels to Views

Throughout the short history of the MVVM design pattern, several methods have originated for populating Views with their ViewModels.  One of the most common methods is to use one of the frameworks (PRISM, MVVM Light, Jounce, among others).  Typically, the ViewModel is registered with an IOC container and retrieved when needed.   One of the more…

Using ICustomTypeProvider in Silverlight 5 to Display JSON Data

By now you’ve likely heard the buzz surrounding the release of the Silverlight 5 beta and some of the great new features. Developers have been waiting some time for a dynamic type that can participate in data-binding for Silverlight. Silverlight 5 introduces this ability, but not in the form of Expando objects or the dynamic…

Fix for Partially Broken Aero Peek

How did we ever use Windows before the taskbar Aero peek? Rolling your mouse across the taskbar and having the previews is an amazing productivity enhancement. On one of my machines aero peek was partially broken. Using ALT+TAB showed aero peek, but rolling the mouse across the taskbar no longer showed the thumbnail preview or…

Dynamic Types to Simplify Property Change Notification in Silverlight 4 and 5

The biggest problem with data-binding is the requirement to implement the INotifyPropertyChange interface. There are dozens of solutions out there that try to simplify the process with techniques ranging from parsing lambda expressions and walking the stack frame to using IL weaving to modify classes at compile time. The most popular approach is to derive…

Wildcard inclusions in C# project files

One of the projects I am working on as of late involves hosting a DLR language (IronPython) in a managed application. Our application has dual build targets – one for WPF and one for Silverlight, with nearly identical feature sets. When embedding IronPython in an application there are multiple things to consider from a packaging…

New for Windows Phone (Now) – the Async CTP

As is often the case when big events happen, sometimes some important announcements can get overlooked and/or overshadowed.  Mix 2011 certainly featured big news, including Silverlight 5 Beta, the Windows Phone 7.5 features, IE10, and the latest in the MVC framework.  However, in all of the hoopla, the release of the SP1 refresh of the…

Using Custom Markup Extensions in Silverlight 5

The first beta of Silverlight 5 was announced at MIX this week and is available for downloading. As such, I’ll be blogging about the new features in weeks to come. I’ll also be delivering sessions on Silverlight 5 at several upcoming conferences, including Microsoft TechDays in Belgium, Microsoft DevDays in the Netherlands, Devscovery in Redmond,…

Silverlight Memory Leaks and AutomationPeers

Using a memory profiling tool such as ANTS Memory Profiler from Red-Gate or MemProfiler from SciTech Software (I’m sure there others, but those were the only two I found that can profile a Silverlight Out-Of-Browser application) is a good idea.  By using such a tool, developers can discover a myriad of memory leaks and fix…

Jounce Part 15: Asynchronous Sequential Workflows

One common complexity developers face when writing Silverlight applications is the fact that most operations are forced to asynchronous. When using the Asynchronous Programming Model (APM) or an event-driven model, these operations force the developer to consider the “chain of events” and provide the right code to correctly manage the sequences. Microsoft will address the…