It’s way too hard to get an image next to the text content of a Button, TextBlock, ListBoxItem, TreeViewItem, etc. Coming from a Windows Forms background where many controls had an Image property for displaying a small glyph next to text content, I am constantly frustrated by the verbose XAML required to achieve the same [...]
Archives for Technology
Windows 7 PowerShell Tip
If you’re a system administrator (or like many developers), chances are you use PowerShell a lot and have the PowerShell console or PowerShell ISE on your Windows 7 taskbar. On Windows Vista and on Windows Server 2008 prior to R2 I was annoyed by having both ISE and console on the quick launch bar or [...]
Accept simple mathematical expressions in Silverlight text boxes
Download MathEvalConverter.zip
Background
With the name Einstein, people typically assume I’m good at math. I have the utmost respect for the physicists and mathemeticians of our time, prior, and beyond. But to be honest, math is not my strong suit. In fact I have great difficulty simply adding or subtracting numbers without the use of a calculator. [...]
Excellent WPF performance tips on the Visual Studio Blog
These aren’t your typical, obvious tips. Head over to the Visual Studio Blog to learn some WPF performance tips that the team picked up during the development of Visual Studio 2010. Some of the performance issues required changes to WPF that we all will benefit from in .NET 4. Others are clever ways to work [...]
LINQ for PowerShell
Download LINQ.psm1
I’m gonna start off by saying the module I’m posting about does not follow the PowerShell naming guidelines. In fact, not only does it use non-standard verb names, but the "verb" part of all the function names aren’t even verbs. I hate breaking the rules like this but the Verb-Noun naming couldn’t really group [...]
Path.Combine in .NET 4
I recently blogged about a new method I noticed in .NET 4 on the Enum class. One of the great things about .NET 4 is that it is a new version of base class library too. In .NET 3.0 and 3.5 as we all know, the CLR and BCL was left at version 2.0 which [...]
Hate VS2010 help? Get H3Viewer!
Update: There was a bug in H3Viewer at the time I posted this that showed an empty TOC and Index on x64 versions of Windows. Rob Chandler just informed me the current build (1.0.0.20) fixes this and I have confirmed it now works fine on x64! Apparently in between Beta 2 and RC Microsoft [...]
FullScreenBehavior makes full-screen apps in WPF easy
Download FullScreenDemo Project
So now I’m working on an application that will be used at a trade show in a booth. Customers will come up to the application and type in the area code and exchange of their phone number and the application will tell them whether or not they can move their phone number over [...]
Enum.HasFlag in .NET 4
Shh… hear that? It’s the sound of a million developers ripping out their home-grown HasFlag, IsFlagSet, CheckFlag, etc helper methods. Just noticed that in .NET 4 System.Enum now has a built-in HasFlag method. As Forrest Gump would say “Lt. Dan says we don’t have to worry about enum flags no more. That’s good. One less [...]
Unit tests are no substitute for manual tests by end users
I like unit testing. I’m not a hard liner so I don’t take it too seriously. I don’t necessarily fully subscribe to the test-first approach in all cases and I think aiming for 100% code coverage is rarely practical. But I do like unit tests. They give my a certain peace of mind and set [...]
Posts