WindowsXamlManager WindowsXamlManager WindowsXamlManager WindowsXamlManager Class

Definition

Represents the UWP XAML framework in a non-UWP desktop application (for example, a WPF or Windows Forms application) that hosts UWP controls.

Note

This API is currently available as a developer preview. Although we encourage you to try out this API in your own prototype code now, we do not recommend that you use it in production code at this time. This API will continue to mature and stabilize in future Windows releases. Microsoft makes no warranties, express or implied, with respect to the information provided here.

public : sealed class WindowsXamlManager : IClosable, IWindowsXamlManager
struct winrt::Windows::UI::Xaml::Hosting::WindowsXamlManager : IClosable, IWindowsXamlManager
public sealed class WindowsXamlManager : IDisposable, IWindowsXamlManager
Public NotInheritable Class WindowsXamlManager Implements IDisposable, IWindowsXamlManager
Attributes

Windows 10 requirements

Device family
Windows Desktop Extension SDK (introduced v10.0.17763.0)
API contract
Windows.UI.Xaml.Hosting.HostingContract (introduced v3)

Remarks

WindowsXamlManager is part of the UWP XAML hosting API. This API enables non-UWP desktop applications to host any control that derives from Windows.UI.Xaml.UIElement ) in a UI element that is associated with a window handle (HWND). This API can be used by desktop applications built using WPF, Windows Forms, and the Windows API (Win32). For more information, see Using the UWP XAML hosting API in a desktop application.

WindowsXamlManager provides a static InitializeForCurrentThread method you can use to initialize the UWP XAML framework on the current thread

Methods

Close() Close() Close() Close()

Closes and releases any resources used by this WindowsXamlManager.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

InitializeForCurrentThread() InitializeForCurrentThread() InitializeForCurrentThread() InitializeForCurrentThread()

Initializes the UWP XAML framework in a non-UWP desktop application (for example, a WPF or Windows Forms application) on the current thread.

Note

This API is currently available as a developer preview. Although we encourage you to try out this API in your own prototype code now, we do not recommend that you use it in production code at this time. This API will continue to mature and stabilize in future Windows releases. Microsoft makes no warranties, express or implied, with respect to the information provided here.

See Also