Microsoft.UI.Xaml.Hosting Namespace

Provides services relevant to XAML design surfaces hosted in a larger application.

Classes

DesktopWindowXamlSource

Enables a desktop application to host WinUI controls in any UI element that is associated with a window handle (HWND).

DesktopWindowXamlSourceGotFocusEventArgs

Provides event data for the GotFocus event.

DesktopWindowXamlSourceTakeFocusRequestedEventArgs

Provides event data for the TakeFocusRequested event.

ElementCompositionPreview

Enables access to composition visual objects that back XAML elements in the XAML composition tree.

WindowsXamlManager

Represents the WinUI XAML framework in a non-Windows App SDK (WASDK) desktop application (for example, a WPF or Windows Forms application).

XamlShutdownCompletedOnThreadEventArgs

Provides data for the WindowsXamlManager.XamlShutdownCompletedOnThread event.

XamlSourceFocusNavigationRequest

Provides information about a focus request for a DesktopWindowXamlSource object.

XamlSourceFocusNavigationResult

Provides data for a request to navigate focus to a DesktopWindowXamlSource object by using the NavigateFocus(Microsoft.UI.Xaml.Hosting.XamlSourceFocusNavigationRequest) method.

Enums

XamlSourceFocusNavigationReason

Specifies values that represent reasons that a UIElement got focus in a desktop application that uses a DesktopWindowXamlSource object to host XAML-based UI.

Examples

This sample shows how to add a WASDK island with XAML content to a Win32 app (the Windows App SDK runtime must be installed for the app to run).

Simple Island App

See also