Initially Turning on FxCop/Code Analysis for a Large Code Base

Recently I was asked a question that’s come up several times so I thought I’d share the answer. I’ve inherited a large code base that has never had FxCop run on it. When I ran the binaries through FxCop, it reported tens of thousands of warnings, which overwhelmed me. While I should fix those warnings,…

Silverlight Behaviors and Triggers: Storyboard Trigger Example

One of the most powerful benefits of Silverlight is that it uses the DependencyProperty model. Using this model, you can create attached properties to describe reusable behaviors and attach those behaviors to certain elements. An example of this is firing animations in the UI elements. One criticism of Silverlight has been the lack of support…

Updated Compile-Help.PS1 and Neat PowerShell Scripting Tricks

One of my favorite PowerShell scripts of all time is Jeff Hillman’s Compile-Help. Instead of attempting to read the PowerShell help in a text window, Jeff’s outstanding script packages up all the help into a searchable, linkified, and easy to read Compiled HTML Help (.CHM) file. Especially if you are new to PowerShell, easily being…

Dynamic Silverlight Controls

I’ve had some fun with dynamic controls lately. Wanted to share a few caveats that I found for those of you trying to spin some of your own. The premise is simple: we have XML configuration that drives the UI, so based on the values parsed from the XML, we generate the appropriate control. I…

Silverlight/Prism ViewModel and DelegateCommand

In yesterday’s post about Decoupled ChildWindow Dialogs in Silverlight using Prism, I demonstrated a way to use EventAggregator to decouple the implementation of a dialog from the code that requires the confirmation. In one example, I showed a code-behind click event that fired off the process, something like this: private void Button_Delete_Click(object sender, System.Windows.RoutedEventArgs e)…

Silverlight ComboBoxes and the Importance of Equals

So I was struggling for awhile with a binding issue in my Silverlight application, and learned the hard way that I forgot my basics. The scenario is fairly common. I have a view model that contains the entity I want to edit along with supporting lists. The common example I see on the web is…

Changing the Visual Studio Splash Screen Registered User

On a mailing list I subscribe to, there was an interesting question, “How do you change the user information shown in the Visual Studio splash screen?” I’ve circled in red the user information below. As I was curious about the same thing because my copy of Visual Studio shows that my company name is Microsoft,…

Decoupled ChildWindow Dialogs with Prism in Silverlight 3

A common user interface component is the confirmation or message box, which is often presented as a dialog returns a boolean (OK/Cancel). There are a variety of ways to achieve this, but how can you decouple the implementation of the popup from the request itself? This is necessary, for example, for unit testing when you…

A Twist on the Twist of the Observer Pattern

Thanks to those of you who read my Twist on the Observer pattern and gave me the feedback. You said, “Hey, Jeremy, that’s neat, but there is already a pattern established for what you’re talking about, and a few great solutions ready to use. Besides, they are much, much more powerful…” Thanks to Microsoft MVP…

Silverlight on IE6: Nagging Security Bug

Do you have a wonderful Silverlight application that you enjoy running in all of the glorious browser flavors available, only to find out that some weird quirky issue pops up in our old friend, Internet Explorer version 6.0 (IE6)? Perhaps you were as puzzled as we were when IE6 would complain with a “Security warning:…

IUnityContainer and the Rabbit Hole

I’m working on an exciting project using Silverlight and the PRISM framework/Composite Application Library. It is perfect for our use as a rich, interactive line of business application that has a lot of features. We want to be able to quickly and easily extend areas of functionality (which the dependency injection and region management features…

A Twist on the Observer Pattern

The observer pattern is well established and used. The typical scenario is to register to an class and then allow your Notify method to be called. This often involves keeping an internal list of observers and then iterating them to notify that something has changed. I had a situation recently that warranted a lighter weight…