atomui/samples/AtomUI.Demo.Desktop/ShowCase/TreeViewShowCase.axaml.cs
polarboy bba4f9b41a 完成绘制节点线段
完成绘制节点线段
2024-08-14 14:24:07 +08:00

41 lines
1.3 KiB
C#

using Avalonia;
using Avalonia.Controls;
namespace AtomUI.Demo.Desktop.ShowCase;
public partial class TreeViewShowCase : UserControl
{
public static readonly StyledProperty<bool> ShowLineSwitchCheckedProperty =
AvaloniaProperty.Register<TreeViewShowCase, bool>(nameof(ShowLineSwitchChecked), true);
public static readonly StyledProperty<bool> ShowIconSwitchCheckedProperty =
AvaloniaProperty.Register<TreeViewShowCase, bool>(nameof(ShowIconSwitchChecked), false);
public static readonly StyledProperty<bool> ShowLeafSwitcherSwitchCheckedProperty =
AvaloniaProperty.Register<TreeViewShowCase, bool>(nameof(ShowLeafSwitcherSwitchChecked), false);
public bool ShowLineSwitchChecked
{
get => GetValue(ShowLineSwitchCheckedProperty);
set => SetValue(ShowLineSwitchCheckedProperty, value);
}
public bool ShowIconSwitchChecked
{
get => GetValue(ShowIconSwitchCheckedProperty);
set => SetValue(ShowIconSwitchCheckedProperty, value);
}
public bool ShowLeafSwitcherSwitchChecked
{
get => GetValue(ShowLeafSwitcherSwitchCheckedProperty);
set => SetValue(ShowLeafSwitcherSwitchCheckedProperty, value);
}
public TreeViewShowCase()
{
InitializeComponent();
DataContext = this;
}
}