FadeInThemeAnimation Class

表示控件首次显示时应用于控件的预配置不透明动画。

继承

Object
  DependencyObject
    Timeline
      FadeInThemeAnimation

语法


public sealed class FadeInThemeAnimation : Timeline


<FadeInThemeAnimation ... />

特性

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

成员

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

构造函数

FadeInThemeAnimation类 具有这些构造函数。

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

 

事件

FadeInThemeAnimation类 具有这些事件。

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

 

方法

The FadeInThemeAnimation 类 具有这些方法。 它还继承方法于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)

 

属性

FadeInThemeAnimation类 具有这些属性。

属性访问类型说明

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.

 

示例

下面的示例将 FadeInThemeAnimationFadeOutThemeAnimation 应用于矩形。


<StackPanel>
    <StackPanel.Resources>

        <!-- Theme animations like this can use the default behavior like
             this example or you could use properties like BeginTime and 
             Duration to tweak when and how quickly the animation occures. 
             If you want more control over a fade animation (e.g. just partial
             fade), you will need to use DoubleAnimation to animate the Opacity 
             property of the element you want to fade in or out. -->
        <Storyboard x:Name="EnterStoryboard">
            <FadeOutThemeAnimation Storyboard.TargetName="myRectangle" />
        </Storyboard>
        <Storyboard x:Name="ExitStoryboard">
            <FadeInThemeAnimation Storyboard.TargetName="myRectangle" />
        </Storyboard>
    </StackPanel.Resources>
    <Rectangle x:Name="myRectangle" 
               PointerEntered="Rectangle_PointerEntered" 
               PointerExited="Rectangle_PointerExited"   
               Fill="Blue" Width="200" Height="300" />
</StackPanel>



// When the pointer enters the rectangle space, the animation begins.
private void Rectangle_PointerEntered(object sender, PointerRoutedEventArgs e)
{
    EnterStoryboard.Begin();
}

private void Rectangle_PointerExited(object sender, PointerRoutedEventArgs e)
{
    ExitStoryboard.Begin();
}


要求

最低支持客户端

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

最低支持服务器

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

命名空间

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

元数据

Windows.winmd

另请参见

Timeline
动画处理淡化
淡化动画的准则和检查表

 

 

显示:
© 2014 Microsoft