CoreWindowResizeManager Classe

Definição

Define um tipo usado para gerenciar eventos CoreWindow.SizeChanged . Esse tipo é usado por estruturas (como XAML) ou aplicativos que implementam seu próprio IFrameWorkView para sincronizar a entrega entre o espaço reservado desenhado pelo shell (como uma tela inicial) e o quadro desenhado primeiro pelos aplicativos, de modo que não haja lacuna na transição de um para o outro. Se seu aplicativo não implementar o IFrameWorkView em si, você não deverá participar dessa sincronização, pois a estrutura fará isso por você.

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
Herança
Object Platform::Object IInspectable CoreWindowResizeManager
Atributos

Requisitos do Windows

Família de dispositivos
Windows 10 (introduzida na 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduzida na v1.0)

Comentários

Quando CoreWindow.SizeChanged for acionado , chame o método estático CoreWindowResizeManager.GetForCurrentView para obter uma instância desse tipo para o CoreWindow atual.

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

Propriedades

ShouldWaitForLayoutCompletion

Obtém ou define se o chamador deve aguardar a conclusão do novo layout.

Métodos

GetForCurrentView()

Obtém uma instância de CoreWindowResizeManager para o CoreWindow atual do aplicativo em execução.

NotifyLayoutCompleted()

Notifica o objeto CoreWindow pai de que o novo layout foi concluído.

Aplica-se a