年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

58 lines
3.5 KiB

<windows:BaseWindow
xmlns:windows="clr-namespace:KGIS.Framework.Utils;assembly=KGIS.Framework.Utils"
x:Class="Kingo.Plugin.DataDictionary.Views.DicHelpTree"
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"
mc:Ignorable="d" Title="帮助控件-选择节点"
d:DesignHeight="500"
d:DesignWidth="330"
ResizeMode="NoResize"
Loaded="BaseWindow_Loaded">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/KUI;component/Themes/Style/TreeViewStyle.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.Resources>
<HierarchicalDataTemplate x:Key="ItemNode" ItemsSource="{Binding Nodes,Mode=TwoWay}">
<StackPanel Orientation="Horizontal" Height="28" ContextMenu="{Binding cMenu}">
<Image Width="18" Source="{Binding Icon}" Height="18" Margin="8,0" />
<TextBlock Name="txtBox" Text="{Binding Name}" FontSize="13" VerticalAlignment="Center" Margin="3,0,0,0">
</TextBlock>
</StackPanel>
<HierarchicalDataTemplate.Triggers>
<DataTrigger Binding="{Binding IsOpenEdit,Mode=TwoWay}" Value="true">
<Setter TargetName="txtBox" Property="Foreground" Value="Red" />
</DataTrigger>
</HierarchicalDataTemplate.Triggers>
</HierarchicalDataTemplate>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" HorizontalAlignment="Left" Width="auto" Height="420" Margin="12,10">
<ScrollViewer HorizontalAlignment="Left" VerticalAlignment="Top" Height="400" MaxWidth="315" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<ScrollViewer.Content>
<TreeView Height="390" x:Name="tvHelpTree" Width="290" ItemTemplate="{StaticResource ItemNode}" >
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="IsExpanded" Value="{Binding IsExpanded}"></Setter>
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
</ScrollViewer.Content>
</ScrollViewer>
</DockPanel>
<StackPanel HorizontalAlignment="Center" Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center">
<Button x:Name="btnSave" Content="确 定" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="10,0" Click="btnSave_Click"/>
<Button x:Name="btnClean" Content="清 空" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="10,0" Click="btnClean_Click" />
<Button x:Name="btnCancel" Content="取 消" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="10,0" Click="btnCancel_Click" />
</StackPanel>
</Grid>
</windows:BaseWindow>