Popup.PopupAnimation Propriedade

Definição

Recebe ou define uma animação para a abertura e o fecho de um Popup controlo.

public:
 property System::Windows::Controls::Primitives::PopupAnimation PopupAnimation { System::Windows::Controls::Primitives::PopupAnimation get(); void set(System::Windows::Controls::Primitives::PopupAnimation value); };
[System.ComponentModel.Bindable(true)]
public System.Windows.Controls.Primitives.PopupAnimation PopupAnimation { get; set; }
[<System.ComponentModel.Bindable(true)>]
member this.PopupAnimation : System.Windows.Controls.Primitives.PopupAnimation with get, set
Public Property PopupAnimation As PopupAnimation

Valor de Propriedade

O PopupAnimation valor de enumeração que define uma animação para abrir e fechar um Popup controlo. A predefinição é None.

Atributos

Exemplos

O exemplo seguinte mostra como definir a PopupAnimation propriedade.

myPopup.AllowsTransparency = true;
myPopup.AllowsTransparency = True
<DockPanel  Width="500" Background="Aqua">
  <Popup Placement="Center" PlacementRectangle="0,0,30,50"  
          IsOpen ="True" AllowsTransparency="True"
          PopupAnimation="Fade">
    <TextBlock Background="Purple">Popup Text</TextBlock>
  </Popup>
</DockPanel>
myTextBlockPopup.PopupAnimation = PopupAnimation.Fade;
myTextBlockPopup.PopupAnimation = PopupAnimation.Fade

Observações

A Popup só pode animar quando a AllowsTransparency propriedade está definida para true. Isto exige que a aplicação que cria o Popup controlo corra com total confiança.

Se for PlacementTarget animado, não Popup será animado.

Informação de Propriedade de Dependência

Iteme Value
Campo identificador PopupAnimationProperty
Propriedades dos metadados definidas como true None

Aplica-se a

Ver também