feat: Add HoneycombPanel and demo.
This commit is contained in:
1 parent
d1944b01c3
commit
e7005d09b5
16 files changed
+263
-1
No files matched your search
@@ -0,0 +1,49 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
x:Class="HandyControlDemo.UserControl.CirclePanelDemo">
|
||||
<UserControl.Resources>
|
||||
<ControlTheme x:Key="CirclePanelButton" TargetType="Button">
|
||||
<Setter Property="UseLayoutRounding" Value="False" />
|
||||
<Setter Property="Height" Value="77" />
|
||||
<Setter Property="Width" Value="36.06" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate TargetType="Button">
|
||||
<Panel Width="36.06" Height="77">
|
||||
<Path Data="{StaticResource CirclePanelDemoGeometry}"
|
||||
Fill="{DynamicResource PrimaryBrush}"
|
||||
Stretch="Fill" />
|
||||
<Path Data="{StaticResource CirclePanelRightGeometry}"
|
||||
Fill="White"
|
||||
Stretch="Uniform"
|
||||
Height="21"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
<Style Selector="^:pointerover">
|
||||
<Setter Property="Opacity" Value=".9" />
|
||||
</Style>
|
||||
<Style Selector="^:pressed">
|
||||
<Setter Property="Opacity" Value=".6" />
|
||||
</Style>
|
||||
<Style Selector="^:disabled">
|
||||
<Setter Property="Opacity" Value="0.4" />
|
||||
</Style>
|
||||
</ControlTheme>
|
||||
</UserControl.Resources>
|
||||
<hc:CirclePanel Margin="64" Diameter="170">
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
<Button Theme="{StaticResource CirclePanelButton}" />
|
||||
</hc:CirclePanel>
|
||||
</UserControl>
|
||||
Reference in new issue
Block a user