ShellView.xaml 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <Window x:Class="CyberX8_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. WindowStartupLocation="CenterScreen"
  8. xmlns:prism="http://prismlibrary.com/"
  9. mc:Ignorable="d"
  10. Title="Jet Plasma" Style="{StaticResource ShellWindow}" Loaded="CustomWnd_Loaded" Closed="CustomWnd_Closed">
  11. <Window.Resources>
  12. <!--通用TabControl样式-->
  13. <Style TargetType="{x:Type TabControl}" >
  14. <!--<Setter Property="Background" Value="#FFC5D0D8"/>-->
  15. <Setter Property="Background" Value="#B1D2F2"/>
  16. <Setter Property="FontFamily" Value="Arial,SimSun"/>
  17. <Setter Property="FontSize" Value="13"></Setter>
  18. <Setter Property="ItemContainerStyle">
  19. <Setter.Value>
  20. <Style>
  21. <!--<Setter Property="Control.Height" Value="24"></Setter>-->
  22. <Setter Property="Control.Template">
  23. <Setter.Value>
  24. <ControlTemplate TargetType="{x:Type TabItem}">
  25. <Grid Margin="0 0 0 0" Cursor="Hand">
  26. <Path Data="M130 0 L 0 0 L 10 23 L 110 23 L 130 0" StrokeThickness="1" Fill="{TemplateBinding Background}"
  27. Stroke="Black" Panel.ZIndex="3">
  28. </Path>
  29. <!--<Path Data="M190 23 L 0 23 L 10 0 L 170 0 L 190 23" StrokeThickness="1" Fill="{TemplateBinding Background}" Stroke="Black">
  30. </Path>-->
  31. <!--<ContentPresenter Margin="10 3 10 0" ContentSource="Header" HorizontalAlignment="Center" />-->
  32. <TextBlock Text="{TemplateBinding Header}" HorizontalAlignment="Center" FontSize="18" Panel.ZIndex="3"/>
  33. </Grid>
  34. <ControlTemplate.Triggers>
  35. <Trigger Property="IsSelected" Value="True">
  36. <Trigger.Setters>
  37. <Setter Property="Background" Value="#FFCBD8D8"></Setter>
  38. <Setter Property="Panel.ZIndex" Value="3"></Setter>
  39. </Trigger.Setters>
  40. </Trigger>
  41. <Trigger Property="IsSelected" Value="False">
  42. <Trigger.Setters>
  43. <Setter Property="Background" Value="#FFA7ADAD"></Setter>
  44. </Trigger.Setters>
  45. </Trigger>
  46. </ControlTemplate.Triggers>
  47. </ControlTemplate>
  48. </Setter.Value>
  49. </Setter>
  50. </Style>
  51. </Setter.Value>
  52. </Setter>
  53. <Setter Property="Template">
  54. <Setter.Value>
  55. <ControlTemplate TargetType="{x:Type TabControl}">
  56. <Grid ClipToBounds="True" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="True">
  57. <Grid.ColumnDefinitions>
  58. <ColumnDefinition Width="*"/>
  59. </Grid.ColumnDefinitions>
  60. <Grid.RowDefinitions>
  61. <RowDefinition Height="25"/>
  62. <RowDefinition Height="*" />
  63. </Grid.RowDefinitions>
  64. <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" Margin="0,0,0,-12">
  65. <StackPanel Name="HeaderPanel" Orientation="Horizontal" Grid.Row="0" Background="#2c4746"
  66. Margin="0,0,0,0" IsItemsHost="True" KeyboardNavigation.TabIndex="1" />
  67. </ScrollViewer>
  68. <Border Name="ContentPanel" Grid.Row="1" Background="{TemplateBinding Panel.Background}" BorderBrush="{TemplateBinding Border.BorderBrush}"
  69. BorderThickness="{TemplateBinding Border.BorderThickness}" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2"
  70. KeyboardNavigation.TabNavigation="Local">
  71. <ContentPresenter Name="PART_SelectedContentHost" Margin="{TemplateBinding Control.Padding}"
  72. Content="{TemplateBinding TabControl.SelectedContent}" ContentSource="SelectedContent" ContentStringFormat="{TemplateBinding TabControl.SelectedContentStringFormat}"
  73. ContentTemplate="{TemplateBinding TabControl.SelectedContentTemplate}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/>
  74. </Border>
  75. </Grid>
  76. </ControlTemplate>
  77. </Setter.Value>
  78. </Setter>
  79. </Style>
  80. <Style TargetType="Button" x:Key="navButton">
  81. <Setter Property="Cursor" Value="Hand"/>
  82. <Setter Property="Foreground" Value="#FF004294" />
  83. <Setter Property="BorderBrush" Value="Blue" />
  84. <Setter Property="Margin" Value="5"/>
  85. <Setter Property="FontFamily" Value="Arial,SimSun" />
  86. <Setter Property="FontSize" Value="22"/>
  87. <Setter Property="Height" Value="45"></Setter>
  88. <Setter Property="Width" Value="160"></Setter>
  89. <Setter Property="HorizontalAlignment" Value="Right"></Setter>
  90. <Setter Property="VerticalAlignment" Value="Top"></Setter>
  91. <Setter Property="Template">
  92. <Setter.Value>
  93. <ControlTemplate TargetType="ButtonBase">
  94. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}">
  95. <ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}"
  96. ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
  97. Margin="{TemplateBinding Control.Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
  98. VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" />
  99. </Border>
  100. </ControlTemplate>
  101. </Setter.Value>
  102. </Setter>
  103. <Setter Property="Background" >
  104. <Setter.Value>
  105. <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮.png">
  106. </ImageBrush>
  107. </Setter.Value>
  108. </Setter>
  109. <Style.Triggers>
  110. <Trigger Property="IsMouseOver" Value="True">
  111. <Setter Property="Background" >
  112. <Setter.Value>
  113. <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_悬停.png">
  114. </ImageBrush>
  115. </Setter.Value>
  116. </Setter>
  117. </Trigger>
  118. <Trigger Property="IsPressed" Value="true">
  119. <Setter Property="Background" >
  120. <Setter.Value>
  121. <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_点击.png">
  122. </ImageBrush>
  123. </Setter.Value>
  124. </Setter>
  125. </Trigger>
  126. </Style.Triggers>
  127. </Style>
  128. </Window.Resources>
  129. <Grid>
  130. <Grid.RowDefinitions>
  131. <RowDefinition Height="104"/>
  132. <RowDefinition />
  133. <RowDefinition Height="50"/>
  134. </Grid.RowDefinitions>
  135. <ContentControl x:Name="Top_Frame" Grid.Row="0" prism:RegionManager.RegionName="TopRegion"/>
  136. <!--<ScrollViewer Grid.Row="1" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden">-->
  137. <ContentControl x:Name="Main_Frame" Grid.Row="1" prism:RegionManager.RegionName="MainRegion">
  138. </ContentControl>
  139. <!--</ScrollViewer>-->
  140. <StackPanel x:Name="Bottom_Frame" Grid.Row="2" Background="{DynamicResource BottomFrame_BG}" Orientation="Horizontal"/>
  141. </Grid>
  142. </Window>