CoreWindowResizeManager Classe

Definizione

Definisce un tipo utilizzato per gestire gli eventi CoreWindow.SizeChanged . Questo tipo viene usato dai framework (ad esempio XAML) o dalle app che implementano il proprio IFrameWorkView per sincronizzare il passaggio tra il segnaposto disegnato dalla shell (ad esempio una schermata iniziale) e la prima cornice disegnata dalle app, in modo che non vi sia alcun gap nella transizione da uno all'altro. Se l'app non implementa l'interfaccia IFrameWorkView stessa, non dovresti partecipare a questa sincronizzazione perché il framework lo farà automaticamente.

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
Ereditarietà
Object Platform::Object IInspectable CoreWindowResizeManager
Attributi

Requisiti Windows

Famiglia di dispositivi
Windows 10 (è stato introdotto in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (è stato introdotto in v1.0)

Commenti

Quando Viene attivato CoreWindow.SizeChanged , chiamare il metodo statico CoreWindowResizeManager.GetForCurrentView per ottenere un'istanza di questo tipo per coreWindow corrente.

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;
}

Proprietà

ShouldWaitForLayoutCompletion

Ottiene o imposta un valore che indica se il chiamante deve attendere il completamento del nuovo layout.

Metodi

GetForCurrentView()

Ottiene un'istanza di CoreWindowResizeManager per coreWindow corrente dell'app in esecuzione.

NotifyLayoutCompleted()

Notifica all'oggetto CoreWindow padre che il nuovo layout è stato completato.

Si applica a