Microsoft Windows UI Library namespaces

This section provides detailed API reference information for the Windows UI Library (WinUI) APIs that ship as WinUI 2.


For WinUI APIs in the Windows App SDK, see the Windows App SDK namespaces.

WinUI 2 is a library of official native Microsoft UI controls and features (tightly integrated with Windows 10 and later SDKs) for Universal Windows Platform (UWP) apps. WinUI 2 can be used in any Windows 10 UWP XAML app, desktop application through XAML Islands, or in a Xamarin.Forms app running on Windows 10 using native view embedding.

For links to the APIs, see the Namespaces section below. Select the WinUI version using the drop down above the API reference TOC.



The WinUI 2 Gallery app includes interactive examples of most WinUI 2 controls, features, and functionality.

If installed already, open the app by clicking the following link: WinUI 2 Gallery.

If not installed, you can download the WinUI 2 Gallery from the Microsoft Store.

You can also get the source code from GitHub.


Namespace Description
Microsoft.UI.Xaml Provides general framework APIs for the Windows UI Library (WinUI).
Microsoft.UI.Xaml.Automation.Peers Defines support types for the Microsoft UI Automation infrastructure.
Microsoft.UI.Xaml.Controls Provides UI controls and classes for creating custom controls.
Microsoft.UI.Xaml.Controls.AnimatedVisuals Defines the built-in animated visuals that can be played by an AnimatedIcon object.
Microsoft.UI.Xaml.Controls.Primitives Defines the components that comprise WinUI controls, or otherwise support the control composition model.
Microsoft.UI.Xaml.Core.Direct Provides a way for middleware authors to access low-level, high-performance XAML APIs and achieve better CPU and working set performance.
Microsoft.UI.Xaml.Media Provides brushes, basic media support, and graphics primitives.
Microsoft.UI.Xaml.XamlTypeInfo Provides support for the XAML schema.