<TreeView x:Name="tvProperties" Width="250" Padding="0" Margin="20.5,8,20.5,-8" BorderThickness="1">
<TreeView.ItemTemplate>
<HierarchicalDataTemplate DataType="{x:Type local:PropertyNodeItem}" ItemsSource="{Binding Children}">
<StackPanel Orientation="Horizontal">
<StackPanel.ToolTip>
<TextBlock VerticalAlignment="Center" Text="{Binding Name}" TextWrapping="Wrap" MaxWidth="200" />
</StackPanel.ToolTip>
<Image VerticalAlignment="Center" Source="{Binding Icon}" Width="16" Height="16" Margin="0,0,2,2"/>
<TextBlock VerticalAlignm
WPF 可以自定义字段的Treeview
最新推荐文章于 2024-07-03 22:29:11 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)