CoreWindowResizeManager Classe

Définition

Définit un type utilisé pour gérer les événements CoreWindow.SizeChanged . Ce type est utilisé par les frameworks (tels que XAML) ou les applications qui implémentent leur propre IFrameWorkView pour synchroniser le transfert entre le placholder dessiné par l’interpréteur de commandes (tel qu’un écran de démarrage) et le premier cadre dessiné des applications, afin qu’il n’y ait pas d’écart dans la transition de l’un à l’autre. Si votre application n’implémente pas le IFrameWorkView lui-même, vous ne devez pas participer à cette synchronisation, car l’infrastructure le fera pour vous.

public ref class CoreWindowResizeManager sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class CoreWindowResizeManager final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class CoreWindowResizeManager
Public NotInheritable Class CoreWindowResizeManager
Héritage
Object Platform::Object IInspectable CoreWindowResizeManager
Attributs

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Remarques

Lorsque CoreWindow.SizeChanged est déclenché, appelez la méthode statique CoreWindowResizeManager.GetForCurrentView pour obtenir une instance de ce type pour le CoreWindow actuel.

if (m_windowSizeChangeInProgress)
{
    // A window size change has been initiated and the app has just completed presenting
    // the first frame with the new size. Notify the resize manager so that we can abbreviate
    // any resize animation and prevent unnecessary delays.
    Windows::UI::Core::CoreWindowResizeManager::GetForCurrentView().NotifyLayoutCompleted();
    m_windowSizeChangeInProgress = false;
}
if (m_windowSizeChangeInProgress)
{
 // A window size change has been initiated and the app has just completed presenting
 // the first frame with the new size. Notify the resize manager so we can abbreviate
 // any resize animation and prevent unnecessary delays.
 CoreWindowResizeManager::GetForCurrentView()->NotifyLayoutCompleted();
 m_windowSizeChangeInProgress = false;
}

Propriétés

ShouldWaitForLayoutCompletion

Obtient ou définit si l’appelant doit attendre la fin de la nouvelle disposition.

Méthodes

GetForCurrentView()

Obtient une instance de CoreWindowResizeManager pour le CoreWindow actuel de l’application en cours d’exécution.

NotifyLayoutCompleted()

Avertit l’objet CoreWindow parent que la nouvelle disposition est terminée.

S’applique à