FadeInThemeAnimation 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
表示首次显示控件时应用于控件的预配置的不透明度动画。
public ref class FadeInThemeAnimation sealed : Timeline
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class FadeInThemeAnimation final : Timeline
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class FadeInThemeAnimation final : Timeline
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class FadeInThemeAnimation : Timeline
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class FadeInThemeAnimation : Timeline
Public NotInheritable Class FadeInThemeAnimation
Inherits Timeline
<FadeInThemeAnimation ... />
- 继承
- 属性
Windows 要求
设备系列 |
Windows 10 (在 10.0.10240.0 中引入)
|
API contract |
Windows.Foundation.UniversalApiContract (在 v1.0 中引入)
|
示例
以下示例将 FadeInThemeAnimation 和 FadeOutThemeAnimation 应用于矩形。
<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();
}
构造函数
FadeInThemeAnimation() |
初始化 FadeInThemeAnimation 类的新实例。 |
属性
AutoReverse |
获取或设置一个值,该值指示时间线在完成向前迭代后是否按相反的顺序播放。 (继承自 Timeline) |
BeginTime |
获取或设置此 时间线 应开始的时间。 (继承自 Timeline) |
Dispatcher |
获取与此对象关联的 CoreDispatcher 。 CoreDispatcher 表示可以访问 UI 线程上的 DependencyObject 的工具,即使代码是由非 UI 线程启动的。 (继承自 DependencyObject) |
Duration |
获取或设置此时间线播放的时间长度,而不是计数重复。 (继承自 Timeline) |
FillBehavior |
获取或设置一个值,该值指定动画在其活动周期结束时的行为方式。 (继承自 Timeline) |
RepeatBehavior |
获取或设置此时间线的重复行为。 (继承自 Timeline) |
SpeedRatio |
获取或设置相对于其父级的速率,此时此 时间线的进度。 (继承自 Timeline) |
TargetName |
获取或设置目标控件元素的引用名称。 |
TargetNameProperty |
标识 TargetName 依赖属性。 |
方法
ClearValue(DependencyProperty) |
清除依赖属性的本地值。 (继承自 DependencyObject) |
GetAnimationBaseValue(DependencyProperty) |
返回为依赖属性建立的任何基值,该基值适用于动画未处于活动状态的情况。 (继承自 DependencyObject) |
GetValue(DependencyProperty) |
从 DependencyObject 返回依赖属性的当前有效值。 (继承自 DependencyObject) |
ReadLocalValue(DependencyProperty) |
如果设置了本地值,则返回依赖属性的本地值。 (继承自 DependencyObject) |
RegisterPropertyChangedCallback(DependencyProperty, DependencyPropertyChangedCallback) |
注册通知函数,用于侦听此 DependencyObject 实例上对特定 DependencyProperty 的更改。 (继承自 DependencyObject) |
SetValue(DependencyProperty, Object) |
设置 DependencyObject 上依赖属性的本地值。 (继承自 DependencyObject) |
UnregisterPropertyChangedCallback(DependencyProperty, Int64) |
取消以前通过调用 RegisterPropertyChangedCallback 注册的更改通知。 (继承自 DependencyObject) |
事件
Completed |
在 Storyboard 对象完成播放时发生。 (继承自 Timeline) |