DragOverThemeAnimation DragOverThemeAnimation DragOverThemeAnimation Class

Definition

Represents the preconfigured animation that applies to the elements underneath an element being dragged.

public sealed class DragOverThemeAnimationpublic sealed class DragOverThemeAnimationPublic NotInheritable Class DragOverThemeAnimation
<DragItemThemeAnimation .../>
Inheritance
DragOverThemeAnimationDragOverThemeAnimationDragOverThemeAnimation
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Inherited Members

Inherited properties

Inherited methods

Inherited events

Remarks

Note that setting the Duration property has no effect on this object since the duration is preconfigured.

Examples

The following is an example of a template for a custom control that animates as another element is being dragged over it.

<Style x:Key="ListViewItemStyle1" TargetType="ListViewItem">
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="ListViewItem">
                <Border x:Name="OuterContainer">
                    <VisualStateManager.VisualStateGroups>                        
                        <!—Reordering hint VisualStates of the ListViewItem control which use 
                             DragOverThemeAnimation. -->
                        <VisualStateGroup x:Name="ReorderHintStates">
                            <VisualStateGroup.Transitions>
                                <VisualTransition GeneratedDuration="0:0:0.650" To="NoReorderHint"/>
                            </VisualStateGroup.Transitions>
                            <VisualState x:Name="NoReorderHint"/>
                            <VisualState x:Name="BottomReorderHint">
                                <Storyboard>
                                    <DragOverThemeAnimation 
                                          Direction="Bottom" 
                                          ToOffset="{StaticResource ListViewItemReorderHintThemeOffset}"
                                          TargetName="ReorderHintContent"
                              />
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="TopReorderHint">
                                <Storyboard>
                                    <DragOverThemeAnimation 
                                          Direction="Top" 
                                          ToOffset="{StaticResource ListViewItemReorderHintThemeOffset}"
                                          TargetName="ReorderHintContent"
                              />
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="RightReorderHint">
                                <Storyboard>
                                    <DragOverThemeAnimation 
                                          Direction="Right" 
                                          ToOffset="{StaticResource ListViewItemReorderHintThemeOffset}"
                                          TargetName="ReorderHintContent"
                              />
                                </Storyboard>
                            </VisualState>
                            <VisualState x:Name="LeftReorderHint">
                                <Storyboard>
                                    <DragOverThemeAnimation 
                                          Direction="Left" 
                                          ToOffset="{StaticResource ListViewItemReorderHintThemeOffset}"
                                          TargetName="ReorderHintContent"
                              />
                                </Storyboard>
                            </VisualState>
                        </VisualStateGroup>

                        <!-- Additional state groups here. -->

                    </VisualStateManager.VisualStateGroups>

                    <!-- Template content here. -->

            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

Constructors

DragOverThemeAnimation() DragOverThemeAnimation() DragOverThemeAnimation() DragOverThemeAnimation()

Initializes a new instance of the DragOverThemeAnimation class.

public DragOverThemeAnimation()public New()Public Sub New()public DragOverThemeAnimation()
Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

Direction Direction Direction Direction

Gets or sets the direction that the target should translate, when the animation is active.

public AnimationDirection Direction { get; set; }public AnimationDirection Direction { get; set; }Public ReadWrite Property Direction As AnimationDirectionpublic AnimationDirection Direction { get; set; }
<DragOverThemeAnimation Direction="animationDirectionMemberName" />

Value
AnimationDirection AnimationDirection AnimationDirection

A value of the enumeration.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

DirectionProperty DirectionProperty DirectionProperty DirectionProperty

Identifies the Direction dependency property.

public static DependencyProperty DirectionProperty { get; }public static DependencyProperty DirectionProperty { get; }Public Static ReadOnly Property DirectionProperty As DependencyPropertypublic static DependencyProperty DirectionProperty { get; }
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the Direction dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

TargetName TargetName TargetName TargetName

Gets or sets the reference name of the control element being targeted.

public string TargetName { get; set; }public string TargetName { get; set; }Public ReadWrite Property TargetName As stringpublic string TargetName { get; set; }
<DragOverThemeAnimation TargetName="nameString" />

Value
string string string

The reference name. This is typically the x:Name of the relevant element as declared in XAML.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

TargetNameProperty TargetNameProperty TargetNameProperty TargetNameProperty

Identifies the TargetName dependency property.

public static DependencyProperty TargetNameProperty { get; }public static DependencyProperty TargetNameProperty { get; }Public Static ReadOnly Property TargetNameProperty As DependencyPropertypublic static DependencyProperty TargetNameProperty { get; }
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the TargetName dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

ToOffset ToOffset ToOffset ToOffset

Gets or sets the distance by which the target is translated when the animation is active.

public double ToOffset { get; set; }public double ToOffset { get; set; }Public ReadWrite Property ToOffset As doublepublic double ToOffset { get; set; }
<DragOverThemeAnimation ToOffset="double" />

Value
double double double

The offset, in pixels.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

The direction of the offset is controlled by Direction.

ToOffsetProperty ToOffsetProperty ToOffsetProperty ToOffsetProperty

Identifies the ToOffset dependency property.

public static DependencyProperty ToOffsetProperty { get; }public static DependencyProperty ToOffsetProperty { get; }Public Static ReadOnly Property ToOffsetProperty As DependencyPropertypublic static DependencyProperty ToOffsetProperty { get; }
Value
DependencyProperty DependencyProperty DependencyProperty

The identifier for the ToOffset dependency property.

Attributes
Additional features and requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)