DragOverThemeAnimation DragOverThemeAnimation DragOverThemeAnimation Class

Definition

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

public : sealed class DragOverThemeAnimation : Timeline, IDragOverThemeAnimation
public sealed class DragOverThemeAnimation : Timeline, IDragOverThemeAnimation
Public 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)

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>

Remarks

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

Constructors

DragOverThemeAnimation() DragOverThemeAnimation() DragOverThemeAnimation()

Initializes a new instance of the DragOverThemeAnimation class.

public : DragOverThemeAnimation()
public DragOverThemeAnimation()
Public Sub New()
See Also

Properties

AllowDependentAnimations AllowDependentAnimations AllowDependentAnimations

Inherited from Timeline

AutoReverse AutoReverse AutoReverse

Inherited from Timeline

AutoReverseProperty AutoReverseProperty AutoReverseProperty

Inherited from Timeline

BeginTime BeginTime BeginTime

Inherited from Timeline

BeginTimeProperty BeginTimeProperty BeginTimeProperty

Inherited from Timeline

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.

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.

See Also

Dispatcher Dispatcher Dispatcher

Inherited from DependencyObject

Duration Duration Duration

Inherited from Timeline

DurationProperty DurationProperty DurationProperty

Inherited from Timeline

FillBehavior FillBehavior FillBehavior

Inherited from Timeline

FillBehaviorProperty FillBehaviorProperty FillBehaviorProperty

Inherited from Timeline

RepeatBehavior RepeatBehavior RepeatBehavior

Inherited from Timeline

RepeatBehaviorProperty RepeatBehaviorProperty RepeatBehaviorProperty

Inherited from Timeline

SpeedRatio SpeedRatio SpeedRatio

Inherited from Timeline

SpeedRatioProperty SpeedRatioProperty SpeedRatioProperty

Inherited from Timeline

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
Platform::String string string

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

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.

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.

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.

See Also

Methods

ClearValue(DependencyProperty) ClearValue(DependencyProperty) ClearValue(DependencyProperty)

Inherited from DependencyObject

GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty) GetAnimationBaseValue(DependencyProperty)

Inherited from DependencyObject

GetValue(DependencyProperty) GetValue(DependencyProperty) GetValue(DependencyProperty)

Inherited from DependencyObject

ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty) ReadLocalValue(DependencyProperty)

Inherited from DependencyObject

RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback) RegisterPropertyChangedCallback(DependencyProperty,DependencyPropertyChangedCallback)

Inherited from DependencyObject

SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object) SetValue(DependencyProperty,Object)

Inherited from DependencyObject

UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64) UnregisterPropertyChangedCallback(DependencyProperty,Int64)

Inherited from DependencyObject

Events

Completed Completed Completed

Inherited from Timeline

See Also