ShellView.xaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <wnd:CustomWnd x:Class="Venus_UI.Views.ShellView"
  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:wnd="http://OpenSEMI.Ctrlib.com/presentation"
  7. WindowState="Maximized"
  8. WindowStartupLocation="CenterScreen"
  9. xmlns:prism="http://prismlibrary.com/"
  10. mc:Ignorable="d"
  11. Title="JetPlasma" Height="450" Width="800" Loaded="CustomWnd_Loaded">
  12. <Window.Resources>
  13. <!--通用TabControl样式-->
  14. <Style TargetType="{x:Type TabControl}" >
  15. <!--<Setter Property="Background" Value="#FFC5D0D8"/>-->
  16. <Setter Property="Background" Value="#B1D2F2"/>
  17. <Setter Property="FontFamily" Value="Arial,SimSun"/>
  18. <Setter Property="FontSize" Value="13"></Setter>
  19. <Setter Property="ItemContainerStyle">
  20. <Setter.Value>
  21. <Style>
  22. <!--<Setter Property="Control.Height" Value="24"></Setter>-->
  23. <Setter Property="Control.Template">
  24. <Setter.Value>
  25. <ControlTemplate TargetType="{x:Type TabItem}">
  26. <Grid Margin="0 0 -10 0">
  27. <Path Data="M190 0 L 0 0 L 10 23 L 170 23 L 190 0" StrokeThickness="1" Fill="{TemplateBinding Background}"
  28. Stroke="Black">
  29. </Path>
  30. <ContentPresenter Margin="10 3 10 0" ContentSource="Header" Cursor="Hand" HorizontalAlignment="Center" />
  31. </Grid>
  32. <ControlTemplate.Triggers>
  33. <Trigger Property="IsSelected" Value="True">
  34. <Trigger.Setters>
  35. <Setter Property="Background" Value="#FFCBD8D8"></Setter>
  36. <Setter Property="Panel.ZIndex" Value="1"></Setter>
  37. </Trigger.Setters>
  38. </Trigger>
  39. <Trigger Property="IsSelected" Value="False">
  40. <Trigger.Setters>
  41. <Setter Property="Background" Value="#FFA7ADAD"></Setter>
  42. </Trigger.Setters>
  43. </Trigger>
  44. </ControlTemplate.Triggers>
  45. </ControlTemplate>
  46. </Setter.Value>
  47. </Setter>
  48. </Style>
  49. </Setter.Value>
  50. </Setter>
  51. <Setter Property="Template">
  52. <Setter.Value>
  53. <ControlTemplate TargetType="{x:Type TabControl}">
  54. <Grid ClipToBounds="True" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="True">
  55. <Grid.ColumnDefinitions>
  56. <ColumnDefinition Name="ColumnDefinition0" Width="*"/>
  57. </Grid.ColumnDefinitions>
  58. <Grid.RowDefinitions>
  59. <RowDefinition Name="RowDefinition0" />
  60. <RowDefinition Name="RowDefinition1" Height="25"/>
  61. </Grid.RowDefinitions>
  62. <StackPanel Name="HeaderPanel"
  63. Orientation="Horizontal"
  64. Grid.Row="1"
  65. Background="#2c4746"
  66. Margin="0,0,0,0"
  67. Panel.ZIndex="1"
  68. IsItemsHost="True"
  69. KeyboardNavigation.TabIndex="1"/>
  70. <Border Name="ContentPanel"
  71. Grid.Row="0"
  72. Background="{TemplateBinding Panel.Background}"
  73. BorderBrush="{TemplateBinding Border.BorderBrush}"
  74. BorderThickness="{TemplateBinding Border.BorderThickness}"
  75. KeyboardNavigation.DirectionalNavigation="Contained"
  76. KeyboardNavigation.TabIndex="2"
  77. KeyboardNavigation.TabNavigation="Local">
  78. <ContentPresenter Name="PART_SelectedContentHost"
  79. Margin="{TemplateBinding Control.Padding}"
  80. Content="{TemplateBinding TabControl.SelectedContent}"
  81. ContentSource="SelectedContent"
  82. ContentStringFormat="{TemplateBinding TabControl.SelectedContentStringFormat}"
  83. ContentTemplate="{TemplateBinding TabControl.SelectedContentTemplate}"
  84. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
  85. </Border>
  86. </Grid>
  87. </ControlTemplate>
  88. </Setter.Value>
  89. </Setter>
  90. </Style>
  91. </Window.Resources>
  92. <Grid>
  93. <Grid.RowDefinitions>
  94. <RowDefinition Height="90"/>
  95. <RowDefinition/>
  96. <RowDefinition Height="60"/>
  97. </Grid.RowDefinitions>
  98. <ContentControl x:Name="Top_Frame" Grid.Row="0" prism:RegionManager.RegionName="TopRegion"/>
  99. <ContentControl x:Name="Main_Frame" Grid.Row="1" prism:RegionManager.RegionName="MainRegion" />
  100. <StackPanel x:Name="Bottom_Frame" Grid.Row="2" Background="{DynamicResource BottomFrame_BG}" Orientation="Horizontal"/>
  101. </Grid>
  102. </wnd:CustomWnd>