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…


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…


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…


Capturing C++ Code Coverage with Visual C++

I wrote an article about six months ago on code coverage in C++, which is part of my article Agile C++ Development and Testing with Visual Studio and TFS. In that article, I showed how to use a command line to create code coverage because I was under the impression that Visual Studio 2010 didn’t…


Building for Testability in C++

Ten months ago, when I joined my current team, we had a C++ application that was written as many applications are, with a number of classes, inheritance, and classes creating other classes they needed in order to do their work. The trouble was that writing tests for this code was very hard because it was…


Building Mixed C# and C++ Projects in TFS 2010

We recently added C# unit test projects to our existing C++ product and unit test projects, but they weren’t being built by our gated check-ins. I did some research and found lots of blog posts. The closes one, and the blog post that got me pointed in the right directory, was Aaron Hallberg’s post on…


C++/CLI to C++ Tips and Tricks

In my previous post, Writing Unit Tests in Visual Studio for Native C++, I described the approach I’m using to write unit tests for native C++ code by using C++/CLI, which is C++ code that runs inside the .NET runtime. Because of this “mixed” programming model, there are some techniques you may need to employ…