Drag​Over​Theme​Animation Drag​Over​Theme​Animation Drag​Over​Theme​Animation Class

Definition

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

public sealed class DragOverThemeAnimation : Timeline, IDragOverThemeAnimationpublic sealed class DragOverThemeAnimation : Timeline, IDragOverThemeAnimationPublic NotInheritable Class DragOverThemeAnimation Inherits Timeline Implements IDragOverThemeAnimation
<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()

Properties

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 AnimationDirection
<DragOverThemeAnimation Direction="animationDirectionMemberName" />

Value
AnimationDirection AnimationDirection AnimationDirection

A value of the enumeration.

Attributes
See Also

DirectionProperty DirectionProperty DirectionProperty

Identifies the Direction dependency property.

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

The identifier for the Direction dependency property.

Attributes
See Also

TargetName TargetName TargetName

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

public PlatForm::String TargetName { get; set; }public string TargetName { get; set; }Public ReadWrite Property TargetName As string
<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
See Also

TargetNameProperty TargetNameProperty TargetNameProperty

Identifies the TargetName dependency property.

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

The identifier for the TargetName dependency property.

Attributes
See Also

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 double
<DragOverThemeAnimation ToOffset="double" />

Value
double double double

The offset, in pixels.

Attributes

Remarks

The direction of the offset is controlled by Direction.

See Also

ToOffsetProperty ToOffsetProperty ToOffsetProperty

Identifies the ToOffset dependency property.

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

The identifier for the ToOffset dependency property.

Attributes
See Also

See Also