PopupAnimation Property

Popup.PopupAnimation Property

Gets or sets an animation for the opening and closing of a Popup control.

Namespace: System.Windows.Controls.Primitives
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
public PopupAnimation PopupAnimation { get; set; }
/** @property */
public PopupAnimation get_PopupAnimation ()

/** @property */
public void set_PopupAnimation (PopupAnimation value)

public function get PopupAnimation () : PopupAnimation

public function set PopupAnimation (value : PopupAnimation)

<object PopupAnimation="PopupAnimation" .../>

Property Value

The PopupAnimation enumeration value that defines an animation to open and close a Popup control. The default value is None.

Identifier field

PopupAnimationProperty

Metadata properties set to true

None

A Popup can only animate when the AllowsTransparency property is set to true. This requires the application that creates the Popup control to run with full trust.

If the PlacementTarget is animated, the Popup will not be animated.

The following example shows how to set the PopupAnimation property.

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

myPopup.AllowsTransparency = true;

myTextBlockPopup.PopupAnimation = PopupAnimation.Fade;

More Code

How to: Animate a Popup

This example shows two ways to animate a Popup control.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2016 Microsoft