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)…

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…

Editing WPF Controls in Expression Blend

This is one of those quirks that until you try it, you may not know it exists or what the answer is. I am working on a WPF project and have a separate control library (actually, a module because I am using the Component Application Guidance/PRISM pattern). I pulled it into Expression Blend and was…

Ref Keyword for Reference Types

The Ref keyword is well known. It indicates that you are passing a reference, not a value, to a method. That means that if the method modifies the value, the changes will be apparent to the calling method as well. Where I see a lot of confusion, however, is what happens when dealing with reference…

Lambda Expressions, Anonymous Methods, and Syntactic Sugar

What is the relationship between lambda expressions, anonymous methods, and delegates? The answer is, in two words: syntactic sugar … or is it? To show this, I put together a real simple console program that declares a delegate which returns a string. I then declare a concrete method that matches the delegate signature, and another…

Mac Pro + OS X 10.6 (Snow Leopard) + Windows 7 x64 = Love

If you’ve been reading my blog for a while, you have already seen my infatuation with using Apple hardware. With a freshly pressed copy of Apple’s latest, OS X 10.6 now in my hot little hands, it was time to install both the Leopard and Windows 7 RTM on my main desktop Mac Pro. After…

Fixing a Server 2008 R2 Upgrade from Server 2008 Activation Problem

After remoting into my domain controller I recently upgraded to Server 2008 R2, I very briefly saw a balloon tip pop up that said: “Invalid Windows Activation” (or something close to that). That was odd as I was sure I had already activated the server. I shudder to think what would happen if your domain…

Silverlight 3’s New and Improved Duplex Networking

One of the many cool features added to the run-time in Silverlight 2 was support for WCF duplex services. That support allowed Silverlight clients to connect to duplex services and receive asynchronous callbacks through a callback channel. This made it possible to write Silverlight apps that, for example, update stock prices in near real time as the prices change…

Bugslayer Tips Reappear

A while ago we lost the link where I had put all the tips that ran in my Bugslayer column in Microsoft Systems Journal and MSDN Magazine. Now they’re back. Here’s the complete collection: https://training.atmosera.com/bugslayertips.aspx. Enjoy!