WPF/XAML: Saving a Window or Canvas as a PNG Bitmap

As part of a side project, I needed to take the contents of a WPF application render it (or a subset of it on a Canvas) as a bitmap. The attached Visual Studio 2008 sample application shows how to accomplish both tasks. To illustrate, this is the application window   Clicking Save Window will save…


.NET Framework Cleanup Tool User’s Guide

.NET Framework Cleanup Tool User’s Guide Introduction This .NET Framework cleanup tool is designed to automatically perform a set of steps to remove selected versions of the .NET Framework from a computer.  It will remove files, directories, registry keys and values and Windows Installer product registration information for the .NET Framework.  The tool is intended…


Should an architect code?

For those interested, the role of an architect is –also- being discussed in MSDN, here. My first reply next: The answer depends on what do you mean by “architect” (noun) and also by “code” (verb). What seasoned designers talk about when discussing architecture is so all-encompassing and important for the final outcome that makes me…

1

Under the Hood: WinINet

We often have to work with customers to understand why a specific IE scenario fails.  In some instances we may have to enable some custom logging and data collection to get to the root cause.  However, understanding why we are doing what we are doing is crucial from our customers’ standpoint especially in the post-mortem…


Mailbag: What version of the .NET Framework is included in what version of the OS?

Question: I recently installed Windows Vista.  When I looked in the Programs and Features (formerly known as Add/Remove Programs) control panel, I didn’t see the .NET Framework 2.0 listed.  Therefore I decided to install the .NET Framework 2.0 by downloading it from this location.  However, running that setup displays an error message stating that it…


What are programs?

Curiously enough, the books and references about software development and software engineering I have read… «There are people who prefer to anchor themselves in the comfort of a limited level of knowledge. They consider themselves practical and ‘real-world’-ish» — Andrei Alexandrescu «This is the answer to our question. Programs aren’t physical objects,such as reams of…


I like it even more!

There is one thing that I like even more than writing code and that is: the code were be useful for somebody. This is just another aspect of good design, to elegantly and efficiently solve user’s problems. Hence the need for systematic methods of design, with closed-loop feedback processes that adapt and approximate to the…


I like it!

I like to write code. Reflecting about what this activity of design and programming trigger on me, I see kind of “a fundamental feeling that is hard to define but that people desire to experience”, also known as “pleasure”. A song by Dee Snider and Twisted Sister rock band comes to mind: “It’s only rock’n’roll”,…


Charles Sterling Bio

Charles Sterling came to Microsoft from being a marine biologist working for United States National Marine Fisheries doing marine mammal research on the Bering Sea. He started out at Microsoft supporting Excel and moved through a couple of support teams to being an escalation engineer for Microsoft SQL Server. Taking his love for customers (and…