Provides the animated transition behavior for when list-view controls items change order. Typically this is due to a drag-drop operation. Different controls and themes potentially have varying characteristics for the animations involved.
Inheritance
- Object
- DependencyObject
- Transition
- ReorderThemeTransition
Syntax
<ReorderThemeTransition .../>
Attributes
- ActivatableAttribute(NTDDI_WIN8)
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
- WebHostHiddenAttribute()
Members
The ReorderThemeTransition class has these types of members:
Constructors
The ReorderThemeTransition class has these constructors.
| Constructor | Description |
|---|---|
| ReorderThemeTransition | Initializes a new instance of the ReorderThemeTransition class. |
Methods
The ReorderThemeTransition 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 ReorderThemeTransition class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read-only | Gets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject) |
Remarks
Note that setting the Duration property has no effect on this object since the duration is preconfigured.
Examples
The following example applies a ReorderThemeAnimation to a set of rectangles. As the new rectangles are added to the set, the other rectangles animate around the new one.
<StackPanel> <Button x:Name="AddItemButton" Content="AddItem" Click="AddItemButton_Click" /> <ItemsControl x:Name="ItemsList"> <ItemsControl.ItemsPanel> <ItemsPanelTemplate> <WrapGrid> <WrapGrid.ChildrenTransitions> <!-- Apply a ReorderThemeTransition that will run when child elements are reordered. --> <TransitionCollection> <ReorderThemeTransition /> </TransitionCollection> </WrapGrid.ChildrenTransitions> </WrapGrid> </ItemsPanelTemplate> </ItemsControl.ItemsPanel> <!-- Initial items. --> <Rectangle Width="100" Height="100" Fill="Red" /> <Rectangle Width="100" Height="100" Fill="Green" /> <Rectangle Width="100" Height="100" Fill="Blue" /> </ItemsControl> </StackPanel>
private void AddItemButton_Click(object sender, RoutedEventArgs e) { Rectangle newItem = new Rectangle(); Random rand = new Random(); newItem.Height = 100; newItem.Width = 100; newItem.Fill = new SolidColorBrush(Color.FromArgb(255, (byte)rand.Next(0, 255), (byte)rand.Next(0, 255), (byte)rand.Next(0, 255))); // Insert a new Rectangle of a random color into the ItemsControl at index 2. ItemsList.Items.Insert(2, newItem); }
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