1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <windows:WinBase x:Class="SAGA.GplotDrawData.WinMachineRoomView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:local="clr-namespace:SAGA.GplotDrawData"
- xmlns:windows="clr-namespace:SAGA.RevitUtils.Windows;assembly=SAGA.RevitUtils"
- xmlns:drawData="clr-namespace:DrawData"
- Title="机房拓扑图" Height="450" Width="800">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="150"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"/>
- <RowDefinition Height="20"/>
- </Grid.RowDefinitions>
- <TreeView Name="TreeRootNode" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" SelectedItemChanged="RootNode_OnSelectedItemChanged"
- >
- <TreeView.ItemContainerStyle>
- <Style TargetType="{x:Type TreeViewItem}">
- <Setter Property="IsExpanded" Value="{Binding IsExpanded,Mode=TwoWay}" />
- <Setter Property="IsSelected" Value="{Binding IsSelected,Mode=TwoWay}" />
- </Style>
- </TreeView.ItemContainerStyle>
- <TreeView.ItemTemplate>
- <HierarchicalDataTemplate ItemsSource="{Binding Path=Nodes}">
- <TextBlock Name="Block" Text="{Binding Name}"></TextBlock>
- <HierarchicalDataTemplate.Triggers>
- <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=TreeViewItem},Path=IsSelected}" Value="True">
- <Setter TargetName="Block" Property="Background" Value="DodgerBlue"></Setter>
- <Setter TargetName="Block" Property="Foreground" Value="White"></Setter>
- </DataTrigger>
- </HierarchicalDataTemplate.Triggers>
- </HierarchicalDataTemplate>
- </TreeView.ItemTemplate>
- </TreeView>
- <drawData:UcShowElement Grid.Row="0" Grid.Column="1" x:Name="ucShowElement"></drawData:UcShowElement>
- </Grid>
- </windows:WinBase>
|