Autofocus Nested Textboxes with Rx in Silverlight

The Problem A common UI pattern is to expose text in a read-only container, then swap it for an editable input box based on a command. There are multiple approaches to doing this (including just changing the style of the same container). Swapping between a read-only TextBlock to a TextBox is easy enough, but what…

Using AppDomains to make Non-Threadsafe code Threadsafe

Recently, I was involved in a Wintellect consulting engagement where a customer had some class library code that was created years ago. The code in this class library was not designed to work well in a multithreaded environment. Specifically, this means that if two or more threads called into the class library code at the…

Hello, MEF for Silverlight Quickstart

Published another quickstart. This is an introductory quickstart for the Managed Extensibility Framework, and is similar to the previous one except that it is specific to Silverlight. You can take a look at the article and watch the short video by clicking here.

Zen of Paraffin

With Paraffin 3.5, I included this document, but thought it would be worth posting as well for those of you that aren’t familiar with Paraffin. You can download the lastest release here: https://www.wintellect.com/CS/files/folders/18310/download.aspx Introduction When building WiX-based installers, you quickly run into the problem of maintaining the list of files you want to install. The…

Paraffin 3.5 – Now with Better Minor Upgrade Support

Slowly but surely I’m getting through the list of feature requests everyone’s been asking for. This release of Paraffin brings support for the trick outline by Vagmi Mudumbai (http://geekswithblogs.net/Vagmi.Mudumbai/archive/2006/06/11/81426.aspx) of allowing minor upgrades (AKA patches) to remove files by setting the transitive bit on the component and adding a conditional element that evaluates to false.…

Fluent Validation with MEF and PRISM

Validation is a topic that comes up quite frequently. One concern is how to honor DRY (don’t repeat yourself) principles and create a framework that is reusable across layers. There are some very robust and tested frameworks out there, but sometimes they might be more than what you are looking for. In this post, I’ll…

Simplifying Silverlight Web Service Calls with Reactive Extensions (Rx)

I’ve been working with the Reactive Extensions (Rx) library quite a bit lately and am very impressed. While it is a new way of thinking about services, it certainly makes life much easier. In this example, I’ll show you a way to simplify your web service calls using Rx. In fact, even if you don’t…

Managed Extensibility Framework Quickstart: Hello, MEF

I’ve been working on quickstarts for a community team that I’m a member of. The team is called MEFContrib. We write extensions to the Managed Extensibility Framework as well as supporting manuals and documentation. I’ve been tasked with the quickstarts and as I release them I’ll post them for you. Obviously, a quickstart should be,…

Sharing Commands with the Managed Extensibility Framework

View models can expose commands that are bound to controls. Commands encapsulate an action and a permission, and the advantage to binding is that controls that support commands will automatically disable when the command cannot execute. Commands can also be easily added to view models and tested. It is common to find commands that are…

Unit Testing XAML Data-Bindings in Silverlight

In an interview earlier this year with MSDN geekSpeak, I discussed unit testing for Silverlight and some of the frameworks that are available. One audience member raised a very important question: “How do we test the XAML?” Specifically, what happens when we hand off XAML to a designer or another developer, and they accidently remove…

Using Reactive Extensions (Rx) to Simplify Asynchronous Tests

Reactive Extensions (Rx) is a product from Microsoft Research that simplifies the management and composition of asynchronous events. If you read my earlier post on Asynchronous Workflows, you’ll understand why the asynchronous programming model can sometimes lead to confusing and hard-to-maintain code. There is nothing wrong with the model, but the fact that you must…

Silverlight UI Automation Testing using Prism 4.0

One popular gripe about Silverlight has been the lack of integrated testing tools. There are several types of tests you may perform against a software project. Unit tests can be performed with the aid of the Silverlight Unit Testing Framework and automated with a third-party tool such as StatLight. Automation testing involves hosting the actual…