This commit is contained in:
TheXamlGuy
2024-10-09 14:57:57 +01:00
parent f10d028558
commit 4469a9b0e8
3 changed files with 146 additions and 39 deletions
@@ -3,6 +3,11 @@
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="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Stretch" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="ClipToBounds" Value="False" />
<Setter Property="Template">
<ControlTemplate>
<Border
@@ -13,17 +18,28 @@
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">
<ZoomBorder
x:Name="ZoomBorder"
ClipToBounds="True"
PanButton="Left">
<ContentPresenter
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}" />
</ZoomBorder>
<Canvas
x:Name="Canvas"
Width="{TemplateBinding Width}"
Height="{TemplateBinding Height}"
ClipToBounds="False">
<Border
x:Name="Preview"
x:Name="PeekBorder"
Width="100"
Height="100"
Background="Pink" />
Background="Pink"
ClipToBounds="False"
IsVisible="False" />
</Canvas>
</Grid>
</Border>