即将大削TreeList

This commit is contained in:
2025-09-03 10:34:45 +08:00
parent 6de9a56916
commit 31d3517ecb
92 changed files with 719 additions and 89 deletions

View File

@@ -15,31 +15,20 @@
<!-- Checkbox节点的样式 -->
<HierarchicalDataTemplate DataType="{x:Type local:CheckboxTreeNode}" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal">
<CheckBox IsChecked="{Binding IsChecked}"
Content="{Binding Text}"
Tag="{Binding Tag}">
<!-- 鼠标悬停时显示 Tag 内容 -->
<CheckBox.ToolTip>
<ToolTip Content="{Binding Tag}" />
</CheckBox.ToolTip>
</CheckBox>
<ContentControl Content="{Binding obj}" />
</StackPanel>
</HierarchicalDataTemplate>
<!-- Label节点的样式 -->
<HierarchicalDataTemplate DataType="{x:Type local:LabelTreeNode}" ItemsSource="{Binding Children}">
<Label Content="{Binding Text}" VerticalAlignment="Center"/>
<ContentControl Content="{Binding obj}" />
</HierarchicalDataTemplate>
<!-- Combobox节点的样式 -->
<HierarchicalDataTemplate DataType="{x:Type local:ComboboxTreeNode}" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal">
<Label Content="{Binding Text}"/>
<ComboBox SelectedIndex="0"/>
<Label Content="{Binding Text}" Foreground="White"/>
<ContentControl Content="{Binding obj}" />
</StackPanel>
</HierarchicalDataTemplate>
</TreeView.Resources>
</TreeView>
</Grid>