WindowsXamlManager Classe

Définition

Représente l’infrastructure XAML UWP dans une application de bureau non UWP (par exemple, une application WPF ou Windows Forms) qui héberge des contrôles UWP.

public ref class WindowsXamlManager sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.UI.Xaml.Hosting.HostingContract, 196608)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class WindowsXamlManager final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.UI.Xaml.Hosting.HostingContract), 196608)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class WindowsXamlManager : System.IDisposable
Public NotInheritable Class WindowsXamlManager
Implements IDisposable
Héritage
Object Platform::Object IInspectable WindowsXamlManager
Attributs
Implémente

Configuration requise pour Windows

Famille d’appareils
Windows Desktop Extension SDK (introduit dans 10.0.17763.0)
API contract
Windows.UI.Xaml.Hosting.HostingContract (introduit dans v3.0)

Remarques

WindowsXamlManager fait partie de l’API d’hébergement XAML UWP. Cette API permet aux applications de bureau non UWP d’héberger n’importe quel contrôle dérivé de Windows.UI.Xaml.UIElement) dans un élément d’interface utilisateur associé à un handle de fenêtre (HWND). Cette API peut être utilisée par des applications de bureau créées à l’aide de WPF, Windows Forms et de l’API Windows (Win32). Pour plus d’informations, consultez Utilisation de l’API d’hébergement XAML UWP dans une application de bureau.

WindowsXamlManager fournit une méthode Statique InitializeForCurrentThread que vous pouvez utiliser pour initialiser l’infrastructure XAML UWP sur le thread actif.

Méthodes

Close()

Ferme et libère de manière asynchrone toutes les ressources utilisées par ce WindowsXamlManager.

Dispose()

Exécute les tâches définies par l'application associées à la libération ou à la redéfinition des ressources non managées.

InitializeForCurrentThread()

Initialise l’infrastructure XAML UWP dans une application de bureau non UWP (par exemple, une application WPF ou Windows Forms) sur le thread actif.

S’applique à

Voir aussi