MainWindow.xaml 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <windows1:WinBase x:Class="SAGA.GplotDrawData.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:DrawData"
  7. xmlns:windows1="clr-namespace:SAGA.RevitUtils.Windows;assembly=SAGA.RevitUtils"
  8. mc:Ignorable="d"
  9. Title="低压配电节点图" Height="800" Width="1000" MinHeight="800" MinWidth="1000" Name="win"
  10. WindowState="Maximized" >
  11. <Grid>
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="200"/>
  14. <ColumnDefinition Width="*"/>
  15. </Grid.ColumnDefinitions>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="*"/>
  18. <RowDefinition Height="20"/>
  19. </Grid.RowDefinitions>
  20. <local:UcShowElement Grid.Row="0" Grid.Column="1" x:Name="ucShowElement"></local:UcShowElement>
  21. <TreeView Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Name="rootNode"
  22. SelectedItemChanged="RootNode_OnSelectedItemChanged" >
  23. <TreeView.ItemContainerStyle>
  24. <Style TargetType="{x:Type TreeViewItem}">
  25. <Setter Property="IsExpanded" Value="True" />
  26. <!--<Style.Triggers>
  27. <Trigger Property="IsSelected" Value="True">
  28. <Setter TargetName="myBorder" Property="Background" Value="Blue"></Setter>
  29. <Setter TargetName="myText" Property="Foreground" Value="White"></Setter>
  30. </Trigger>
  31. <Trigger Property="IsSelected" Value="False">
  32. <Setter TargetName="myBorder" Property="Background" Value="White"></Setter>
  33. <Setter TargetName="myText" Property="Foreground" Value="Black"></Setter>
  34. </Trigger>
  35. </Style.Triggers>-->
  36. </Style>
  37. </TreeView.ItemContainerStyle>
  38. <TreeView.ItemTemplate>
  39. <HierarchicalDataTemplate ItemsSource="{Binding Path=Childrens}">
  40. <Border Name="myBorder">
  41. <TextBlock Name="myText">
  42. <TextBlock Text="{Binding FloorName}"/>
  43. <TextBlock Text=":"/>
  44. <TextBlock Text="{Binding EName}"/>
  45. </TextBlock></Border>
  46. </HierarchicalDataTemplate>
  47. </TreeView.ItemTemplate>
  48. </TreeView>
  49. </Grid>
  50. </windows1:WinBase>