Getting to the UI Thread from a WP8 WinRT Native Component

Last July I wrote this post on how to get to the UI thread for any type of Windows Phone 8 App. To summarize the previous post: it’s a straight forward process of using a Dispatcher API for C# or a full C++ Windows Phone 8 apps. But there is no such API available to get to the UI thread from the WinRT Component in a Direct3d/XAML application.

I included a bit of sample code in that post to highlight one method I devised of getting to the UI thread from a WinRT component. But I have since gotten a few requests to provide a sample project. So I worked on a sample app and posted it on github. You can check it out here: https://github.com/robwirving/CppUIThreadApp.

I hope this helps my fellow C++ Windows Phone devs, if you have any questions please leave a comment or reach out to me on twitter: @robwirving