即将大削TreeList
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user