mirror of
https://gitee.com/langsisi_admin/serein-flow
synced 2026-03-03 00:00:49 +08:00
27 lines
1.3 KiB
Plaintext
27 lines
1.3 KiB
Plaintext
|
|
<UserControl x:Class="Serein.WorkBench.Themes.LazyTreeView"
|
||
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||
|
|
xmlns:local="clr-namespace:Serein.WorkBench.Themes"
|
||
|
|
xmlns:converters="clr-namespace:Serein.WorkBench.Tool.Converters"
|
||
|
|
mc:Ignorable="d"
|
||
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
||
|
|
|
||
|
|
<UserControl.Resources>
|
||
|
|
<converters:TypeToColorConverter x:Key="TypeToColorConverter" />
|
||
|
|
</UserControl.Resources>
|
||
|
|
|
||
|
|
<Grid>
|
||
|
|
<TreeView Name="treeView"
|
||
|
|
SelectedItemChanged="treeView_SelectedItemChanged"
|
||
|
|
ItemsSource="{Binding RootNodes}">
|
||
|
|
<TreeView.ItemTemplate>
|
||
|
|
<HierarchicalDataTemplate ItemsSource="{Binding SuccessorNodes}">
|
||
|
|
<TextBlock Text="{Binding DisplayName}" Foreground="{Binding ControlType, Converter={StaticResource TypeToColorConverter}}" />
|
||
|
|
</HierarchicalDataTemplate>
|
||
|
|
</TreeView.ItemTemplate>
|
||
|
|
</TreeView>
|
||
|
|
</Grid>
|
||
|
|
</UserControl>
|