123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <Styles xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:id="clr-namespace:Avalonia.Xaml.Interactions.Draggable;assembly=Avalonia.Xaml.Interactions.Draggable">
- <!-- TabControl Drag Styles - Non Virtualizing -->
- <Style Selector=":is(TabControl).draggable">
- <Setter Property="ItemsPanel">
- <ItemsPanelTemplate>
- <StackPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </Setter>
- </Style>
- <Style Selector=":is(TabControl).draggable > :is(TabItem)">
- <Setter Property="ZIndex" Value="0" />
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <ItemDragBehavior HorizontalDragThreshold="3" VerticalDragThreshold="3" />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
- <Style Selector=":is(TabControl).draggable > :is(TabItem):pressed">
- <Setter Property="ZIndex" Value="1" />
- </Style>
- <!-- TabControl Drag Styles - Virtualizing -->
- <Style Selector=":is(TabControl).draggableVirtualizing">
- <Setter Property="ItemsPanel">
- <ItemsPanelTemplate>
- <VirtualizingStackPanel Orientation="Horizontal" />
- </ItemsPanelTemplate>
- </Setter>
- </Style>
- <Style Selector=":is(TabControl).draggableVirtualizing > :is(TabItem)">
- <Setter Property="ZIndex" Value="0" />
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <ItemDragBehavior HorizontalDragThreshold="3" VerticalDragThreshold="3" />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
- <Style Selector=":is(TabControl).draggableVirtualizing > :is(TabItem):pressed">
- <Setter Property="ZIndex" Value="1" />
- </Style>
- <!-- ItemsPanel Drag Styles - Non Virtualizing -->
- <Style Selector=":is(ListBox).draggable">
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Vertical" />
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style Selector=":is(ListBox).draggable > :is(ListBoxItem)">
- <Setter Property="ZIndex" Value="0" />
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <ItemDragBehavior HorizontalDragThreshold="3" VerticalDragThreshold="3" Orientation="Vertical" />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
- <Style Selector=":is(ListBox).draggable > :is(ListBoxItem):pressed">
- <Setter Property="ZIndex" Value="1" />
- </Style>
-
- <!-- ListBox Drag Styles - Virtualizing -->
- <Style Selector=":is(ListBox).draggableVirtualizing">
- <Setter Property="ItemsPanel">
- <Setter.Value>
- <ItemsPanelTemplate>
- <VirtualizingStackPanel Orientation="Vertical" />
- </ItemsPanelTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style Selector=":is(ListBox).draggableVirtualizing > :is(ListBoxItem)">
- <Setter Property="ZIndex" Value="0" />
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <ItemDragBehavior HorizontalDragThreshold="3" VerticalDragThreshold="3" Orientation="Vertical" />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
- <Style Selector=":is(ListBox).draggableVirtualizing > :is(ListBoxItem):pressed">
- <Setter Property="ZIndex" Value="1" />
- </Style>
- <!-- Canvas Drag Styles -->
- <Style Selector=":is(Canvas).draggable > :is(Control)">
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <CanvasDragBehavior />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
- <!-- ItemsControl Canvas Drag Styles -->
- <Style Selector=":is(ItemsControl).draggable > :is(ContentPresenter)">
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <CanvasDragBehavior />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
- <!-- Grid Drag Styles -->
- <Style Selector=":is(Grid).draggable > :is(Control)">
- <Setter Property="(Interaction.Behaviors)">
- <BehaviorCollectionTemplate>
- <BehaviorCollection>
- <GridDragBehavior CopyColumn="True" CopyRow="True" CopyColumnSpan="True" CopyRowSpan="True" />
- </BehaviorCollection>
- </BehaviorCollectionTemplate>
- </Setter>
- </Style>
- </Styles>
|