PopOutThemeAnimation Class

表示在控件关闭/删除时应用于这些控件的热门组件的预配置动画(例如对象上类似工具提示的 UI)。此动画合并不透明和转换。

继承

Object
  DependencyObject
    Timeline
      PopOutThemeAnimation

语法


public sealed class PopOutThemeAnimation : Timeline


<PopOutThemeAnimation .../>

特性

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

成员

PopOutThemeAnimation类 具有这些类型的成员:

构造函数

PopOutThemeAnimation类 具有这些构造函数。

构造函数说明
PopOutThemeAnimation Initializes a new instance of the PopOutThemeAnimation class.

 

事件

PopOutThemeAnimation类 具有这些事件。

事件说明
Completed Occurs when the Storyboard object has completed playing. (继承自Timeline)

 

方法

The PopOutThemeAnimation 类 具有这些方法。 它还继承方法于Object 类.

方法说明
ClearValue Clears the local value of a dependency property. (继承自DependencyObject)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (继承自DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (继承自DependencyObject)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (继承自DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (继承自DependencyObject)

 

属性

PopOutThemeAnimation类 具有这些属性。

属性访问类型说明

AutoReverse

读/写Gets or sets a value that indicates whether the timeline plays in reverse after it completes a forward iteration. (继承自Timeline)

BeginTime

读/写Gets or sets the time at which this Timeline should begin. (继承自Timeline)

Dispatcher

只读Gets the CoreDispatcher that this object is associated with. (继承自DependencyObject)

Duration

读/写Gets or sets the length of time for which this timeline plays, not counting repetitions. (继承自Timeline)

FillBehavior

读/写Gets or sets a value that specifies how the animation behaves after it reaches the end of its active period. (继承自Timeline)

RepeatBehavior

读/写Gets or sets the repeating behavior of this timeline. (继承自Timeline)

SpeedRatio

读/写Gets or sets the rate, relative to its parent, at which time progresses for this Timeline. (继承自Timeline)

TargetName

读/写Gets or sets the reference name of the control element being targeted.

TargetNameProperty

只读Identifies the TargetName dependency property.

 

备注

此动画不会移动或更改对象或其相邻元素。旨在当覆盖内容关闭/移除时,将该动画运用到该内容(如工具提示)中。当内容首先消失时,应使用 PopOutThemeAnimation

在预先配置期间,请注意设置 Duration 属性对该对象没有影响。

示例

下面显示了使用 PopInThemeAnimationPopOutThemeAnimationToolTip 控件的一个示例模板。


<Style x:Key="ToolTipStyle1" TargetType="ToolTip">
    <!-- Sample template for the ToolTip control that uses PopinThemeAnimation and PopOutThemeAnimation. -->
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="ToolTip">
                <Border x:Name="LayoutRoot" 
                         BorderBrush="{TemplateBinding BorderBrush}" 
                         BorderThickness="{TemplateBinding BorderThickness}" 
                         Background="{TemplateBinding Background}">
                    <VisualStateManager.VisualStateGroups>
                        <VisualStateGroup x:Name="OpenStates">
                            <VisualState x:Name="Closed">
                                <Storyboard>
                                    <!-- Run a PopOutThemeAnimation when ToolTip is closed. -->
                                    <PopOutThemeAnimation TargetName="LayoutRoot"/>
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="Opened">
                                <Storyboard>
                                    <!-- Run a PopInThemeAnimation when ToolTip is opened. -->
                                    <PopInThemeAnimation 
                                        FromVerticalOffset="{Binding TemplateSettings.FromVerticalOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" 
                                        FromHorizontalOffset="{Binding TemplateSettings.FromHorizontalOffset, RelativeSource={RelativeSource Mode=TemplatedParent}}" 
                                        TargetName="LayoutRoot"/>
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>
                    </VisualStateManager.VisualStateGroups>
                    <ContentPresenter 
                         ContentTemplate="{TemplateBinding ContentTemplate}" 
                         ContentTransitions="{TemplateBinding ContentTransitions}" 
                         Content="{TemplateBinding Content}" 
                         Margin="{TemplateBinding Padding}"/>
                </Border>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>


要求

最低支持客户端

Windows 8 [仅 Windows 应用商店应用程序]

最低支持服务器

Windows Server 2012 [仅 Windows 应用商店应用程序]

命名空间

Windows.UI.Xaml.Media.Animation
Windows::UI::Xaml::Media::Animation [C++]

元数据

Windows.winmd

另请参见

Timeline
动画处理弹出式用户界面
准则和和弹出式 UI 动画的检查表

 

 

显示:
© 2015 Microsoft