Making a TextBlock in a DataTemplate Accessible

I really love the data templates in XAML that allow me to create a XAML template for rendering an object. This is particularly useful for GridView and other controls that can show the contents of a collection. I was recently working on the accessibility of our application, which allows screen readers to read the text…


Using the App Bar to Operate on Items

I’m building a Windows Store App in C# and XAML, and I wanted to allow you to remove/edit/move items in a GridView control, just like you can in the Finance application: When you right-click an item (or swipe down with touch), the item is selected (MSFT here) and the app bar pops up with commands…


Building a Single-Select List in jQuery

We needed a single-select list box for a web application we’re building. We also needed each item in the list to have rich formatting, so we didn’t want to use the built-in list box. I knew that jQuery UI had a Selectable widget that looked very promising. However we didn’t want multi-selection or the other…


How to Name Test Methods

I really like BDD (Behavior Driven Development) and it’s structure for helping to focus on behavior instead of implementation when you write unit tests. Some time ago I ran across a blog post by my former colleague in the patterns & practices group Daniel Cazzulino: Writing meaningful, self-documenting, behavior-oriented tests. Another good post, which has…


Retrieving TFS Results from a Tree Query

I recently needed to retrieve the results from a TFS tree query using .NET code, via calls to the TFS API. It was easy to find examples for retrieving a set of work items from a flat query, but I couldn’t find any information about how to retrieve a tree. I did find a few…


Allowing Localizing after-the-fact using MUI

Here is the problem. We built an English-only C++ application. However, now some of our customers are asking how they can translate the application into other languages. We don’t have the budget to provide translated versions ourselves, and they’d be happy to do the work themselves. Is there a way they can translate our application…


Capturing Code Coverage for Coded UI Tests

You would think that simply running coded UI tests with everything setup for capturing code coverage would just work, right? And if you’re running your coded UI tests on a 32-bit operating system, it will. However, if you’re running your tests on a 64-bit operating system, chances are you’ll see the test results (pass/fail), but…


Shrinking the Arrow on the WPF Expander

My goal was simple. I needed a smaller arrow in the WPF Expander control to help conserve screen real-estate. Here is the before and after: Before: After: The arrow on the right is 80% of the original size. So how did I accomplish this? It turned out to be far simpler than any of the…


Delay Signing a C++/CLI Assembly

This should be easy, right? Just set the link options to delay sign the assembly with an SNK file. There were two issues I ran into, which I’ll describe here. Fixing Delay Signing in SP1 I used the /DELAYSIGN and /KEYFILE settings in the properties page for my C++/CLI project and everything compiled just fine….


Interpreting C++ Code Coverage Results

You’ve finally gotten code coverage results for your C++ code. But now your code coverage numbers are lower than you expected. Why is that? And how do you get around it? There are several issues that make C++ code coverage data “noisy” and/or inaccurate. First, if you use the standard C++ libraries, you’ll find the…