DragAndDrop core
This commit is contained in:
52
Lattice.UI.DragDrop.WinUI/Themes/DropPreviewAdorner.xaml
Normal file
52
Lattice.UI.DragDrop.WinUI/Themes/DropPreviewAdorner.xaml
Normal file
@@ -0,0 +1,52 @@
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Lattice.UI.DragDrop.WinUI.Controls"
|
||||
xmlns:media="using:Microsoft.UI.Xaml.Media">
|
||||
|
||||
<Style TargetType="controls:DropPreviewAdorner">
|
||||
<Setter Property="PreviewBrush" Value="{ThemeResource Lattice.Brush.Accent}" />
|
||||
<Setter Property="PreviewThickness" Value="{ThemeResource Lattice.BorderThickness.Medium}" />
|
||||
<Setter Property="PreviewColor" Value="{ThemeResource Lattice.Color.Accent}" />
|
||||
<Setter Property="CornerRadius" Value="{ThemeResource Lattice.CornerRadius.Medium}" />
|
||||
<Setter Property="Opacity" Value="{ThemeResource Lattice.Opacity.DropPreview}" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:DropPreviewAdorner">
|
||||
<Border
|
||||
x:Name="PreviewBorder"
|
||||
BorderBrush="{TemplateBinding PreviewBrush}"
|
||||
BorderThickness="{TemplateBinding PreviewThickness}"
|
||||
CornerRadius="{TemplateBinding CornerRadius}"
|
||||
Opacity="{TemplateBinding Opacity}">
|
||||
<Border.Background>
|
||||
<SolidColorBrush
|
||||
Color="{TemplateBinding PreviewColor}"
|
||||
Opacity="0.1" />
|
||||
</Border.Background>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Highlighted">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="PreviewBorder.Opacity" Value="0.9" />
|
||||
<Setter Target="PreviewBorder.BorderThickness" Value="3" />
|
||||
<Setter Target="PreviewBorder.Background">
|
||||
<Setter.Value>
|
||||
<SolidColorBrush
|
||||
Color="{TemplateBinding PreviewColor}"
|
||||
Opacity="0.15" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user