Microsoft Windows UI Library namespaces
The Windows UI Library (WinUI) is a native user experience (UX) framework for both Windows Desktop and Universal Windows Platform (UWP) applications.
There are two versions of WinUI that ship as NuGet packages: WinUI 2.x and WinUI 3. See the Windows UI Library overview for more details on both.
The namespaces and APIs documented here are valid for both versions.
WinUI 2.x
The WinUI 2.x NuGet package is installed through the Visual Studio NuGet Package Manager and can be used in standard UWP projects, or in Win32 apps via XAML Islands.
For more details, see Getting started with the Windows UI 2.x Library.
WinUI 3
WinUI 3 Previews can be used in all Desktop apps. Download and install the WinUI 3 Preview VSIX package. This adds both the WinUI 3 project templates and the NuGet package containing the WinUI 3 libraries to Visual Studio 2019.
For instructions and more details, see Windows UI Library 3 Preview 3 (November 2020).
Samples
See examples of WinUI features and controls in the XAML Controls Gallery sample app.
If you don't have the XAML Controls Gallery app installed, get the WinUI 2.x version from the Microsoft Store.
You can also view, clone, and build the XAML Controls Gallery source code from GitHub (switch to the WinUI 3 Preview branch for WinUI 3 Preview controls and features).
Microsoft.ApplicationModel.Resources | Provides simplified access to application resources, such as strings, that are defined using basic naming conventions for runtime apps. |
Microsoft.Foundation | Enables fundamental Windows Runtime functionality, including managing asynchronous operations and accessing property stores. This namespace also defines common value types that represent Uniform Resource Identifier (URI), dates and times, 2-D measurements, and other basic values. |
Microsoft.Graphics | Provides basic data types that contain info on how to draw graphics. These data structs are commonly used to define how large surfaces are drawn when using the CompositionVirtualDrawingSurface class. |
Microsoft.Graphics.DirectX | Specifies pixel formats, and other enumerated constants, for use with Windows Runtime Direct3D 11 interop surfaces. |
Microsoft.System | Enables system functionality such as launching apps, obtaining information about a user, and memory profiling. |
Microsoft.UI | Provides an app with access to core system functionality and run-time information about its UI. |
Microsoft.UI.Composition | Provides APIs for user interface composition. |
Microsoft.UI.Composition.Core | Provides core APIs for user interface composition. |
Microsoft.UI.Composition.Diagnostics | Provides APIs for user interface composition diagnostics and debugging. |
Microsoft.UI.Composition.Effects | Contains classes that are specific to creating effects for User Interactions. These effects are specific to composition. |
Microsoft.UI.Composition.Experimental | |
Microsoft.UI.Composition.Interactions | Provides functionality that enables input driven animations in the visual layer. |
Microsoft.UI.Composition.Interactions.Internal | |
Microsoft.UI.Composition.Internal | |
Microsoft.UI.Composition.Private | |
Microsoft.UI.Composition.Scenes | Provides APIs for loading 3D models and composing 3D scenes. |
Microsoft.UI.Hosting.Experimental | |
Microsoft.UI.Input | Provides support for the Windows input system. This includes: |
Microsoft.UI.Input.Experimental | |
Microsoft.UI.Private.Controls | |
Microsoft.UI.Private.Media | |
Microsoft.UI.Text | Provides support for working with textual content. |
Microsoft.UI.Xaml | Provides general framework APIs for the Windows UI Library (WinUI). |
Microsoft.UI.Xaml.Automation | Defines the support types for Microsoft UI Automation infrastructure. These support types are for implementing Microsoft UI Automation support for a custom control. Also, AutomationProperties provides accessibility info as part of a XAML UI definition. |
Microsoft.UI.Xaml.Automation.Peers | Defines support types for the Microsoft UI Automation infrastructure. |
Microsoft.UI.Xaml.Automation.Provider | Defines provider patterns that are implemented by automation peers and recognized by automation clients. |
Microsoft.UI.Xaml.Automation.Text | Contains enumerations that report specifics about text automation patterns. |
Microsoft.UI.Xaml.Controls | Provides UI controls and classes for creating custom controls. |
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.CustomAttributes | Provides custom attributes (keyword-like descriptive declarations) that annotate programming elements such as types, fields, methods, and properties. |
Microsoft.UI.Xaml.Data | Defines the data binding infrastructure for apps. |
Microsoft.UI.Xaml.Documents | Provides basic text and document model classes. |
Microsoft.UI.Xaml.Hosting | Provides services that are relevant for XAML design surfaces that are hosted in a larger application. |
Microsoft.UI.Xaml.Input | Defines the input and input event infrastructure for apps and UI elements. |
Microsoft.UI.Xaml.Internal | |
Microsoft.UI.Xaml.Interop | Provides basic types for cross-framework integration and interoperation. Notably, this includes interfaces and support types that enable binding patterns. |
Microsoft.UI.Xaml.Markup | Provides XAML language support API for UWP app and the Windows Runtime. |
Microsoft.UI.Xaml.Media | Provides brushes, basic media support, and graphics primitives. |
Microsoft.UI.Xaml.Media.Animation | Provides animation and storyboard API for transition animations, visual states, or animated UI components. |
Microsoft.UI.Xaml.Media.Imaging | Provides types related to imaging and obtaining resources and source files for bitmap images. |
Microsoft.UI.Xaml.Media.Media3D | Contains types that support matrix/perspective transformation. |
Microsoft.UI.Xaml.Navigation | Provides types that support navigation events as initiated by the Page and Frame classes. |
Microsoft.UI.Xaml.Printing | Provides a basic printing support framework for applications. |
Microsoft.UI.Xaml.Resources | Contains CustomXamlResourceLoader, which enables loading of custom resource dictionaries as sources. |
Microsoft.UI.Xaml.Shapes | Defines basic shapes that are intended for decorative rendering or for compositing non-interactive parts of controls. |
Microsoft.UI.Xaml.XamlTypeInfo | Provides support for the XAML schema. |