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
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,40 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:vm="clr-namespace:HandyControlDemo.ViewModel"
|
||||
x:Class="HandyControlDemo.UserControl.HoneycombPanelDemo"
|
||||
DataContext="{Binding HoneycombPanelDemo, Source={x:Static vm:ViewModelLocator.Instance}}">
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Spacing="8"
|
||||
Margin="0,0,0,16">
|
||||
<Button Command="{Binding AddItemCommand}" Content="Add" />
|
||||
<Button Command="{Binding RemoveItemCommand}" Content="Remove" />
|
||||
</StackPanel>
|
||||
<ItemsControl Grid.Row="1"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
ItemsSource="{Binding DataList}">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<hc:HoneycombPanel />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Width="60"
|
||||
Height="60"
|
||||
Margin="6"
|
||||
CornerRadius="30"
|
||||
ClipToBounds="True">
|
||||
<Image Source="{Binding}" Stretch="UniformToFill" />
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
namespace HandyControlDemo.UserControl;
|
||||
|
||||
public partial class HoneycombPanelDemo : Avalonia.Controls.UserControl
|
||||
{
|
||||
public HoneycombPanelDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
File renamed without changes.
Reference in new issue
Block a user