ContentColorPicker WIP

This commit is contained in:
TheXamlGuy
2024-10-09 11:59:23 +01:00
parent a87553fe23
commit f10d028558
3 changed files with 107 additions and 4 deletions
@@ -0,0 +1,33 @@
<ResourceDictionary
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="using:Toolkit.UI.Controls.Avalonia">
<ControlTheme x:Key="{x:Type ContentColorPicker}" TargetType="ContentColorPicker">
<Setter Property="Template">
<ControlTemplate>
<Border
Padding="{TemplateBinding Padding}"
Background="{TemplateBinding Background}"
BackgroundSizing="{TemplateBinding BackgroundSizing}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{TemplateBinding CornerRadius}">
<Grid>
<ContentPresenter
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
<Canvas x:Name="Canvas" Background="Transparent">
<Border
x:Name="Preview"
Width="100"
Height="100"
Background="Pink" />
</Canvas>
</Grid>
</Border>
</ControlTemplate>
</Setter>
</ControlTheme>
</ResourceDictionary>