mirror of
https://gitee.com/chinware/atomui.git
synced 2024-12-04 21:07:45 +08:00
bba4f9b41a
完成绘制节点线段
84 lines
5.0 KiB
XML
84 lines
5.0 KiB
XML
<UserControl
|
|
x:Class="AtomUI.Demo.Desktop.ShowCase.TreeViewShowCase"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:atom="https://atomui.net"
|
|
xmlns:showcase="clr-namespace:AtomUI.Demo.Desktop.ShowCase"
|
|
mc:Ignorable="d">
|
|
<showcase:ShowCasePanel>
|
|
<!-- <showcase:ShowCaseItem -->
|
|
<!-- Title="Basic" -->
|
|
<!-- Description="The most basic usage, tell you how to use checkable, selectable, disabled, defaultExpandKeys, and etc."> -->
|
|
<!-- <atom:TreeView IsCheckable="True" IsDefaultExpandAll="True"> -->
|
|
<!-- <atom:TreeViewItem Header="parent 1"> -->
|
|
<!-- <atom:TreeViewItem Header="parent 1-0"> -->
|
|
<!-- <atom:TreeViewItem Header="leaf" IsCheckable="False" IsChecked="True" /> -->
|
|
<!-- <atom:TreeViewItem Header="leaf" /> -->
|
|
<!-- </atom:TreeViewItem> -->
|
|
<!-- <atom:TreeViewItem Header="parent 1-1" IsChecked="True"> -->
|
|
<!-- <atom:TreeViewItem Header="sss" /> -->
|
|
<!-- </atom:TreeViewItem> -->
|
|
<!-- </atom:TreeViewItem> -->
|
|
<!-- </atom:TreeView> -->
|
|
<!-- </showcase:ShowCaseItem> -->
|
|
<!-- -->
|
|
<!-- <showcase:ShowCaseItem -->
|
|
<!-- Title="Block Node" -->
|
|
<!-- Description="Block Node."> -->
|
|
<!-- <atom:TreeView IsCheckable="True" IsDefaultExpandAll="True" NodeHoverMode="Block"> -->
|
|
<!-- <atom:TreeViewItem Header="parent"> -->
|
|
<!-- <atom:TreeViewItem Header="child 1" IsEnabled="False" /> -->
|
|
<!-- <atom:TreeViewItem Header="child 2" IsCheckable="False" /> -->
|
|
<!-- </atom:TreeViewItem> -->
|
|
<!-- </atom:TreeView> -->
|
|
<!-- </showcase:ShowCaseItem> -->
|
|
|
|
<showcase:ShowCaseItem
|
|
Title="Tree with line"
|
|
Description="Tree with connected line between nodes, turn on by showLine, customize the preset icon by switcherIcon.">
|
|
<StackPanel Orientation="Vertical" Spacing="10">
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<TextBlock>showLine:</TextBlock>
|
|
<atom:ToggleSwitch IsChecked="{Binding ShowLineSwitchChecked,Mode=TwoWay}"/>
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<TextBlock>showIcon:</TextBlock>
|
|
<atom:ToggleSwitch IsChecked="{Binding ShowIconSwitchChecked,Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
<TextBlock>ShowLeafSwitcher:</TextBlock>
|
|
<atom:ToggleSwitch IsChecked="{Binding ShowLeafSwitcherSwitchChecked,Mode=TwoWay}" />
|
|
</StackPanel>
|
|
|
|
<atom:TreeView IsShowLine="{Binding ShowLineSwitchChecked}"
|
|
IsShowIcon="{Binding ShowIconSwitchChecked}"
|
|
IsShowLeafSwitcher="{Binding ShowLeafSwitcherSwitchChecked}">
|
|
<atom:TreeViewItem Header="parent 1" Icon="{atom:IconProvider Kind=CarryOutOutlined}" IsExpanded="True">
|
|
<atom:TreeViewItem Header="parent 1-0" Icon="{atom:IconProvider Kind=CarryOutOutlined}" IsExpanded="True">
|
|
<atom:TreeViewItem Header="leaf 1" Icon="{atom:IconProvider Kind=CarryOutOutlined}" />
|
|
<atom:TreeViewItem Header="leaf 2" Icon="{atom:IconProvider Kind=CarryOutOutlined}" />
|
|
</atom:TreeViewItem>
|
|
<atom:TreeViewItem Header="parent 1-1">
|
|
<atom:TreeViewItem Header="leaf" Icon="{atom:IconProvider Kind=CarryOutOutlined}" />
|
|
</atom:TreeViewItem>
|
|
<atom:TreeViewItem Header="parent 1-2">
|
|
<atom:TreeViewItem Header="leaf 1" Icon="{atom:IconProvider Kind=CarryOutOutlined}" />
|
|
<atom:TreeViewItem Header="leaf 2" Icon="{atom:IconProvider Kind=CarryOutOutlined}" />
|
|
</atom:TreeViewItem>
|
|
</atom:TreeViewItem>
|
|
<atom:TreeViewItem Header="parent 2">
|
|
<atom:TreeViewItem Header="parent 2-0" Icon="{atom:IconProvider Kind=CarryOutOutlined}">
|
|
<atom:TreeViewItem Header="leaf 1" Icon="{atom:IconProvider Kind=CarryOutOutlined}" />
|
|
<atom:TreeViewItem Header="leaf 2" Icon="{atom:IconProvider Kind=CarryOutOutlined}" />
|
|
</atom:TreeViewItem>
|
|
</atom:TreeViewItem>
|
|
</atom:TreeView>
|
|
</StackPanel>
|
|
</showcase:ShowCaseItem>
|
|
|
|
</showcase:ShowCasePanel>
|
|
</UserControl> |