DragAndDrop core

This commit is contained in:
FrigaT
2026-01-18 16:33:35 +03:00
parent 9ea82af329
commit 79bdd8bc62
229 changed files with 21214 additions and 2494 deletions

View File

@@ -0,0 +1,44 @@
<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:DragAdorner">
<Setter Property="Background" Value="{ThemeResource Lattice.Brush.Background.Secondary}" />
<Setter Property="BorderBrush" Value="{ThemeResource Lattice.Brush.Border.Primary}" />
<Setter Property="BorderThickness" Value="{ThemeResource Lattice.BorderThickness.Thin}" />
<Setter Property="Padding" Value="{ThemeResource Lattice.Spacing.Medium}" />
<Setter Property="CornerRadius" Value="{ThemeResource Lattice.CornerRadius.Medium}" />
<Setter Property="Opacity" Value="{ThemeResource Lattice.Opacity.Drag}" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="controls:DragAdorner">
<Grid>
<!-- Фон с тенью -->
<Rectangle
x:Name="Background"
Fill="{TemplateBinding Background}"
Opacity="{TemplateBinding Opacity}"
RadiusX="{TemplateBinding CornerRadius}"
RadiusY="{TemplateBinding CornerRadius}">
<Rectangle.Shadow>
<media:ThemeShadow />
</Rectangle.Shadow>
</Rectangle>
<!-- Контент -->
<ContentPresenter
x:Name="PART_ContentPresenter"
Margin="{TemplateBinding Padding}"
Content="{TemplateBinding DragData}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>