Provides the animated transition behavior on controls when they first appear. You can use this on individual objects or on containers of objects. In the latter case, child elements will animate into view in sequence rather than all at the same time.
Inheritance
- Object
- DependencyObject
- Transition
- EntranceThemeTransition
Syntax
<EntranceThemeTransition .../>
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- MarshalingBehaviorAttribute(Agile)
- StaticAttribute(Windows.UI.Xaml.Media.Animation.IEntranceThemeTransitionStatics, NTDDI_WIN8)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The EntranceThemeTransition class has these types of members:
Constructors
The EntranceThemeTransition class has these constructors.
| Constructor | Description |
|---|---|
| EntranceThemeTransition | Initializes a new instance of the EntranceThemeTransition class. |
Methods
The EntranceThemeTransition class has these methods. It also inherits methods from the Object class.
| Method | Description |
|---|---|
| ClearValue | Clears the local value of a dependency property. (Inherited from DependencyObject) |
| GetAnimationBaseValue | Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject) |
| GetValue | Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject) |
| ReadLocalValue | Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject) |
| SetValue | Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject) |
Properties
The EntranceThemeTransition class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject) | |
| Read/write | Gets or sets the distance by which the target is translated in the horizontal direction when the animation is active. | |
| Read-only | Identifies the FromHorizontalOffset dependency property. | |
| Read/write | Gets or sets the distance by which the target is translated in the vertical direction when the animation is active. | |
| Read-only | Identifies the FromVerticalOffset dependency property. | |
| Read/write | Gets or sets a value that determines whether the transition staggers rendering of multiple items, or renders all items at once. | |
| Read-only | Identifies the IsStaggeringEnabled dependency property. |
Examples
The following example shows a how to apply an EntranceThemeTransition to a Button.
<Button Content="EntranceThemeTransition Button"> <Button.Transitions> <TransitionCollection> <!-- This transition just uses the default behavior which is to have the button animate into view from the right. You can make it start from anywhere on the right by using the FromHorizontalOffset property. If you'd rather see a vertical animation, use the FromVerticalOffset property. --> <EntranceThemeTransition /> </TransitionCollection> </Button.Transitions> </Button>
The following example shows a how to apply an EntranceThemeTransition to a Button using styles.
<Grid Background="{StaticResource ApplicationPageBackgroundBrush}"> <Grid.Resources> <Style x:Key="DefaultButtonStyle" TargetType="Button"> <Setter Property="Transitions"> <Setter.Value> <TransitionCollection> <EntranceThemeTransition/> </TransitionCollection> </Setter.Value> </Setter> </Style> </Grid.Resources> <Button Style="{StaticResource DefaultButtonStyle}" Content="EntranceThemeTransition style applied" /> </Grid>
Commonly, you will want to apply the EntranceThemeTransition animation to all child elements of a panel. In this example, an EntranceThemeTransition is applied to a Grid with a bunch of child rectangles. If you run this sample, the rectangles will animate into view in sequence rather than all at the same time like when you apply the animation to individual objects.
<!-- If you set an EntranceThemeTransition animation on a panel, the children of the panel will automatically offset when they animate into view to create a visually appealing entrance. --> <Grid HorizontalAlignment="Left"> <Grid.ChildrenTransitions> <TransitionCollection> <EntranceThemeTransition/> </TransitionCollection> </Grid.ChildrenTransitions> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="*"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <!-- The sequence children appear depends on their order in the panel's children, not necessarily on where they render on the screen. Be sure to arrange your child elements in the order you want them to transition into view. --> <Rectangle Fill="Red" Grid.Row="0" Grid.Column="0" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Blue" Grid.Row="0" Grid.Column="1" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Green" Grid.Row="0" Grid.Column="2" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Red" Grid.Row="1" Grid.Column="0" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Blue" Grid.Row="1" Grid.Column="1" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Green" Grid.Row="1" Grid.Column="2" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Red" Grid.Row="2" Grid.Column="0" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Blue" Grid.Row="2" Grid.Column="1" Width="100" Height="100" Margin="2"/> <Rectangle Fill="Green" Grid.Row="2" Grid.Column="2" Width="100" Height="100" Margin="2"/> </Grid>
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps only] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps only] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012