Lab: Introduction on using XAML with C++

I recently held a introduction lab about using XAML with C++ for my colleagues. In my team we are all XAML developers but we are using C# so we were interested in how XAML works with C++. A few of us has programmed C++ in the past but most were new to the language. There are a document attached in the repository which explains C++ for C# developers more in depth but I only showed part of it to my colleagues. If one is really interesting in writing a complete app using C++ and your coming from the C# world this document probably well worth reading. The document can also be found here:

The lab itself is about testing to bind C++ code to XAML more than learning C++ so if one need to first learn some C++ one could start by looking at this site:

I have taken parts of these examples when I created the lab so if there is any questions and/or missing parts please look at the source: and

The lab can be found here on GitHub:

The short introduction slides can be found here on slideshare:


Some of my colleagues thought that the lab was a little hard when not knowing any C++ on forehand but most finished it well within the 2 hour time limit I had set up. It was only meant to give a short feel of how C++ works with XAML and not a complete introduction. Use this lab if you are interested in seeing how XAML works with C++, and then follow the attached links (or search on MSDN) if it is something you want to look more into.

This Post Has One Comment

  1. Nice test with comparing c++ and c# computation speed. Only, the last line in StartClicked event handler in c# version should be (timeAfter – timeBefore).TotalMilliseconds instead of (timeAfter – timeBefore).Milliseconds, I think.

Leave a Reply

Close Menu