chore: add avalonia TreeView demo.
This commit is contained in:
1 parent
2c05bcedf1
commit
eca5885fee
6 files changed
+228
-3
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
x:Class="HandyControlDemo.UserControl.TreeViewDemo">
|
||||
<WrapPanel Margin="16">
|
||||
<TreeView Width="200"
|
||||
Margin="16"
|
||||
ItemsSource="{Binding DataList}">
|
||||
<TreeView.ItemTemplate>
|
||||
<TreeDataTemplate ItemsSource="{Binding DataList}">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
<TreeView Width="200"
|
||||
Margin="16"
|
||||
ItemsSource="{Binding DataList}"
|
||||
Theme="{StaticResource TreeView.Small}">
|
||||
<TreeView.ItemTemplate>
|
||||
<TreeDataTemplate ItemsSource="{Binding DataList}">
|
||||
<TextBlock Text="{Binding Name}" />
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>
|
||||
</WrapPanel>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl;
|
||||
|
||||
public partial class TreeViewDemo : Avalonia.Controls.UserControl
|
||||
{
|
||||
public TreeViewDemo()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user