In this tutorial I will show you how to build a Gauge Control for your Universal Windows App. This is how it looks.
Here are the steps to building a custom Gauge control for your universal Windows app:
Step 1: Add Gauge class in the Shared Project
Add Gauge class to Controls folder in the Shared project. Replace the empty Gauge class with the following code.
Step 2: Add a Reference to Controls Directory in MainPage.xaml
Add a xmlns reference to Controls directory in MainPage.xaml.
Step 3: Add the Style for Gauge Control in Page Resources
Now add the style for Gauge control in <Page.Resources></Page.Resources>.
Instead of adding the Style in MainPage.xaml you could add the Style in SharedResources.xaml folder. Follow our tutorial on Shared theme resources to see how to use shared resources in universal Windows Apps.
Step 4: Add the XAML for Gauge Control in the Page
Now simply use the Gauge control in your page.
Deploy the app to see if it works.
Feel free to download the source code for reference or clone it from Github.