Popup.PopupAnimation Proprietà

Definizione

Ottiene o imposta un'animazione per l'apertura e la chiusura di un controllo Popup.

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

Valore della proprietà

PopupAnimation

Valore dell'enumerazione PopupAnimation che definisce un'animazione tramite cui viene aperto e chiuso un controllo Popup. Il valore predefinito è None.

Attributi

Esempio

Nell'esempio seguente viene illustrato come impostare la proprietà PopupAnimation.

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

Commenti

Un Popup oggetto può essere animato solo quando la AllowsTransparency proprietà è impostata su true. Ciò richiede che l'applicazione che crea il Popup controllo da eseguire con attendibilità totale.

Se l'oggetto è animato, l'oggetto PlacementTarget Popup non verrà animato.

Informazioni proprietà di dipendenza

Campo Identificatore PopupAnimationProperty
Proprietà dei metadati impostate su true Nessuno

Si applica a

Vedi anche