Windows Runtime and Extension SDKs


Windows Runtime components are self-contained objects that you can instantiate and use from any language, including C#, Visual Basic, JavaScript, and C++. In addition to the .NET Core meta-package we saw in the previous chapter, UWP app also has a reference by default to a Universal Windows SDK.

Universal Windows SDK

Universal Windows is the reference to Windows Runtime and it has been factored into a series of APIs contracts.

The set of APIs within a device family is broken down into subdivisions known as API contracts. You can find a list of different API contracts here


Most of those APIs inside windows runtime are factored into a single contract. Let us now search for the Universal keyword on the API Contracts page.

API Contracts page

You can see links to various APIs and you can also see the Universal family is so big that it has 12 pages of documentation.

You can also search for phone API contract on this page.

phone API

Let us now click on the Windows.Phone.PhoneContract and scroll down; you will now see the battery information of phone or the mobile device.

battery information

If you want to add this information on top of what you already have, then you should add the references manually. Let us now go to the Visual Studio and right-click on the References in Solution Explorer.

Select Add References…

Add References

You can now see the new reference category for Universal Windows; under this category there is Core which refers to the core Universal Windows API contracts

API contracts
  • The Extensions allow us to extend the functionality and you will see different references Mobile, Desktop and other Extensions.

  • There are different SKD extensions and you can add on top to get more APIs.

  • You can also see different versions. So, make sure you get the latest version to get the updated APIs and then click OK.

updated APIs

You can now see that Windows Mobile Extensions for the UWP is added as reference.