-api-id | -api-type |
---|---|
T:Windows.UI.Xaml.Media.Animation.DropTargetItemThemeAnimation |
winrt class |
Represents the preconfigured animation that applies to potential drop target elements.
<DropTargetItemThemeAnimation .../>
Note that setting the Duration property has no effect on this object since the duration is preconfigured.
The following is an example of a template for a custom control that supports an animation for when it is dropped on the screen.
<Style x:Key="ListViewItemStyle1" TargetType="ListViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border x:Name="OuterContainer">
<VisualStateManager.VisualStateGroups>
<!-- Dragging-related VisualStates of the ListViewItem control which use
DragItemThemeAnimation and DropTargetItemThemeAnimation. -->
<VisualStateGroup x:Name="DragStates">
<VisualStateGroup.Transitions>
<VisualTransition GeneratedDuration="0:0:0.650" To="NotDragging"/>
</VisualStateGroup.Transitions>
<VisualState x:Name="NotDragging"/>
<VisualState x:Name="Dragging">
<Storyboard>
<DragItemThemeAnimation TargetName="InnerDragContent"/>
<FadeOutThemeAnimation TargetName="SelectedCheckMarkOuter"/>
<FadeOutThemeAnimation TargetName="SelectedBorder"/>
</Storyboard>
</VisualState>
<VisualState x:Name="DraggingTarget">
<Storyboard>
<DropTargetItemThemeAnimation TargetName="OuterContainer"/>
</Storyboard>
</VisualState>
<VisualState x:Name="MultipleDraggingPrimary">
<Storyboard>
<FadeInThemeAnimation TargetName="MultiArrangeOverlayBackground"/>
<FadeInThemeAnimation TargetName="MultiArrangeOverlayText"/>
<DragItemThemeAnimation TargetName="ContentBorder"/>
<FadeOutThemeAnimation TargetName="SelectionBackground"/>
<FadeOutThemeAnimation TargetName="SelectedCheckMarkOuter"/>
<FadeOutThemeAnimation TargetName="SelectedBorder"/>
<FadeOutThemeAnimation TargetName="PointerOverBorder"/>
</Storyboard>
</VisualState>
<VisualState x:Name="MultipleDraggingSecondary">
<Storyboard>
<FadeOutThemeAnimation TargetName="ContentContainer"/>
</Storyboard>
</VisualState>
</VisualStateGroup>
<!-- Additional state groups here. -->
</VisualStateManager.VisualStateGroups>
<!-- Template content here. -->
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Timeline, Animating drag-and-drop sequences, Guidelines and checklist for drag-and-drop animations