ShellView.xaml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <Window 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" Closed="CustomWnd_Closed">
  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" Cursor="Hand">
  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" HorizontalAlignment="Center" />-->
  31. <TextBlock Text="{TemplateBinding Header}" HorizontalAlignment="Center" FontSize="18"/>
  32. </Grid>
  33. <ControlTemplate.Triggers>
  34. <Trigger Property="IsSelected" Value="True">
  35. <Trigger.Setters>
  36. <Setter Property="Background" Value="#FFCBD8D8"></Setter>
  37. <Setter Property="Panel.ZIndex" Value="1"></Setter>
  38. </Trigger.Setters>
  39. </Trigger>
  40. <Trigger Property="IsSelected" Value="False">
  41. <Trigger.Setters>
  42. <Setter Property="Background" Value="#FFA7ADAD"></Setter>
  43. </Trigger.Setters>
  44. </Trigger>
  45. </ControlTemplate.Triggers>
  46. </ControlTemplate>
  47. </Setter.Value>
  48. </Setter>
  49. </Style>
  50. </Setter.Value>
  51. </Setter>
  52. <Setter Property="Template">
  53. <Setter.Value>
  54. <ControlTemplate TargetType="{x:Type TabControl}">
  55. <Grid ClipToBounds="True" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="True">
  56. <Grid.ColumnDefinitions>
  57. <ColumnDefinition Name="ColumnDefinition0" Width="*"/>
  58. </Grid.ColumnDefinitions>
  59. <Grid.RowDefinitions>
  60. <RowDefinition Name="RowDefinition0" />
  61. <RowDefinition Name="RowDefinition1" Height="25"/>
  62. </Grid.RowDefinitions>
  63. <StackPanel Name="HeaderPanel"
  64. Orientation="Horizontal"
  65. Grid.Row="1"
  66. Background="#2c4746"
  67. Margin="0,0,0,0"
  68. Panel.ZIndex="1"
  69. IsItemsHost="True"
  70. KeyboardNavigation.TabIndex="1"/>
  71. <Border Name="ContentPanel"
  72. Grid.Row="0"
  73. Background="{TemplateBinding Panel.Background}"
  74. BorderBrush="{TemplateBinding Border.BorderBrush}"
  75. BorderThickness="{TemplateBinding Border.BorderThickness}"
  76. KeyboardNavigation.DirectionalNavigation="Contained"
  77. KeyboardNavigation.TabIndex="2"
  78. KeyboardNavigation.TabNavigation="Local">
  79. <ContentPresenter Name="PART_SelectedContentHost"
  80. Margin="{TemplateBinding Control.Padding}"
  81. Content="{TemplateBinding TabControl.SelectedContent}"
  82. ContentSource="SelectedContent"
  83. ContentStringFormat="{TemplateBinding TabControl.SelectedContentStringFormat}"
  84. ContentTemplate="{TemplateBinding TabControl.SelectedContentTemplate}"
  85. SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
  86. </Border>
  87. </Grid>
  88. </ControlTemplate>
  89. </Setter.Value>
  90. </Setter>
  91. </Style>
  92. <Style TargetType="Button" x:Key="navButton">
  93. <Setter Property="Cursor" Value="Hand"/>
  94. <Setter Property="Foreground" Value="#FF004294" />
  95. <Setter Property="BorderBrush" Value="Blue" />
  96. <Setter Property="Margin" Value="5"/>
  97. <Setter Property="FontFamily" Value="Arial,SimSun" />
  98. <Setter Property="FontSize" Value="22"/>
  99. <Setter Property="Height" Value="45"></Setter>
  100. <Setter Property="Width" Value="160"></Setter>
  101. <Setter Property="HorizontalAlignment" Value="Right"></Setter>
  102. <Setter Property="VerticalAlignment" Value="Top"></Setter>
  103. <Setter Property="Template">
  104. <Setter.Value>
  105. <ControlTemplate TargetType="ButtonBase">
  106. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  107. <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" Margin="{TemplateBinding Control.Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" />
  108. </Border>
  109. </ControlTemplate>
  110. </Setter.Value>
  111. </Setter>
  112. <Setter Property="Background" >
  113. <Setter.Value>
  114. <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮.png">
  115. </ImageBrush>
  116. </Setter.Value>
  117. </Setter>
  118. <Style.Triggers>
  119. <Trigger Property="IsMouseOver" Value="True">
  120. <Setter Property="Background" >
  121. <Setter.Value>
  122. <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_悬停.png">
  123. </ImageBrush>
  124. </Setter.Value>
  125. </Setter>
  126. </Trigger>
  127. <Trigger Property="IsPressed" Value="true">
  128. <Setter Property="Background" >
  129. <Setter.Value>
  130. <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_点击.png">
  131. </ImageBrush>
  132. </Setter.Value>
  133. </Setter>
  134. </Trigger>
  135. </Style.Triggers>
  136. </Style>
  137. </Window.Resources>
  138. <Grid>
  139. <Grid.RowDefinitions>
  140. <RowDefinition Height="104"/>
  141. <RowDefinition/>
  142. <RowDefinition Height="50"/>
  143. </Grid.RowDefinitions>
  144. <ContentControl x:Name="Top_Frame" Grid.Row="0" prism:RegionManager.RegionName="TopRegion"/>
  145. <ContentControl x:Name="Main_Frame" Grid.Row="1" prism:RegionManager.RegionName="MainRegion" />
  146. <StackPanel x:Name="Bottom_Frame" Grid.Row="2" Background="{DynamicResource BottomFrame_BG}" Orientation="Horizontal"/>
  147. </Grid>
  148. </Window>