ReorderThemeTransition class

Applies to Windows and Windows Phone

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


public ref class ReorderThemeTransition sealed : Transition


<ReorderThemeTransition .../>

Attributes

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

Members

The ReorderThemeTransition class has these types of members:

Constructors

The ReorderThemeTransition class has these constructors.

ConstructorDescription
ReorderThemeTransition Initializes a new instance of the ReorderThemeTransition class.

 

Methods

The ReorderThemeTransition class has these methods. It also inherits methods from the Object class.

MethodDescription
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.

PropertyAccess typeDescription

Dispatcher

Read-onlyGets 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>


void DocsCPP::MainPage::AddItemButton_Click(Object^ sender,RoutedEventArgs^ e)
{
    Rectangle^ newItem = ref new Rectangle();
            
    newItem->Height = 100;
    newItem->Width = 100;

    Color color;
    color.R = rand() % 256;
    color.G = rand() % 256;
    color.B = rand() % 256;

    newItem->Fill = ref new SolidColorBrush(color);

    // Insert a new Rectangle of a random color into the ItemsControl at index 2.
    ItemsList->Items->InsertAt(2, newItem);
}

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

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

Metadata

Windows.winmd

See also

Transition

 

 

Show:
© 2014 Microsoft