Files
Lattice/Lattice.UI.DragDrop.WinUI/Themes/DragAdorner.xaml

48 lines
2.3 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--
DragAdorner.xaml - Стили для визуального элемента перетаскивания.
Содержит шаблон элемента DragAdorner с поддержкой теней, скруглений и анимаций.
-->
<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>