<Window x:Class="Venus_UI.Views.ShellView" 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" WindowStartupLocation="CenterScreen" xmlns:prism="http://prismlibrary.com/" mc:Ignorable="d" Title="JetPlasma" Style="{StaticResource ShellWindow}" Loaded="CustomWnd_Loaded" Closed="CustomWnd_Closed"> <Window.Resources> <!--通用TabControl样式--> <Style TargetType="{x:Type TabControl}" > <!--<Setter Property="Background" Value="#FFC5D0D8"/>--> <Setter Property="Background" Value="{StaticResource mainPageBrush}"/> <Setter Property="FontFamily" Value="Arial,SimSun"/> <Setter Property="FontSize" Value="13"></Setter> <Setter Property="ItemContainerStyle"> <Setter.Value> <Style> <!--<Setter Property="Control.Height" Value="24"></Setter>--> <Setter Property="Control.Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabItem}"> <Grid Margin="0 0 -10 0" Cursor="Hand"> <!--<Path Data="M190 0 L 0 0 L 10 23 L 170 23 L 190 0" StrokeThickness="1" Fill="{TemplateBinding Background}" Stroke="Black"> </Path>--> <!--<ContentPresenter Margin="10 3 10 0" ContentSource="Header" HorizontalAlignment="Center" />--> <Border Width="200" BorderThickness="2,0,0,0" BorderBrush="#36688C" x:Name="border1"/> <TextBlock Text="{TemplateBinding Header}" HorizontalAlignment="Center" FontSize="18" Foreground="White"/> </Grid> <ControlTemplate.Triggers> <Trigger Property="IsSelected" Value="True"> <Trigger.Setters> <Setter TargetName="border1" Property="Background" Value="#0A8FD6"></Setter> <Setter Property="Panel.ZIndex" Value="1"></Setter> </Trigger.Setters> </Trigger> <Trigger Property="IsSelected" Value="False"> <Trigger.Setters> <Setter TargetName="border1" Property="Background" Value="#043C64"></Setter> </Trigger.Setters> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> </Setter.Value> </Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type TabControl}"> <Grid ClipToBounds="True" KeyboardNavigation.TabNavigation="Local" SnapsToDevicePixels="True"> <Grid.ColumnDefinitions> <ColumnDefinition Name="ColumnDefinition0" Width="*"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Name="RowDefinition0" /> <RowDefinition Name="RowDefinition1" Height="25"/> </Grid.RowDefinitions> <StackPanel Name="HeaderPanel" Orientation="Horizontal" Grid.Row="1" Background="#043C64" Margin="0,0,0,0" Panel.ZIndex="1" IsItemsHost="True" KeyboardNavigation.TabIndex="1"/> <Border Name="ContentPanel" Grid.Row="0" Background="{TemplateBinding Panel.Background}" BorderBrush="{TemplateBinding Border.BorderBrush}" BorderThickness="{TemplateBinding Border.BorderThickness}" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local"> <ContentPresenter Name="PART_SelectedContentHost" Margin="{TemplateBinding Control.Padding}" Content="{TemplateBinding TabControl.SelectedContent}" ContentSource="SelectedContent" ContentStringFormat="{TemplateBinding TabControl.SelectedContentStringFormat}" ContentTemplate="{TemplateBinding TabControl.SelectedContentTemplate}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"/> </Border> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style TargetType="Button" x:Key="navButton"> <Setter Property="Cursor" Value="Hand"/> <Setter Property="Foreground" Value="#FF004294" /> <Setter Property="BorderBrush" Value="Blue" /> <Setter Property="Margin" Value="5"/> <Setter Property="FontFamily" Value="Arial,SimSun" /> <Setter Property="FontSize" Value="22"/> <Setter Property="Height" Value="45"></Setter> <Setter Property="Width" Value="160"></Setter> <Setter Property="HorizontalAlignment" Value="Right"></Setter> <Setter Property="VerticalAlignment" Value="Top"></Setter> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ButtonBase"> <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}"> <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}" /> </Border> </ControlTemplate> </Setter.Value> </Setter> <Setter Property="Background" > <Setter.Value> <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮.png"> </ImageBrush> </Setter.Value> </Setter> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" > <Setter.Value> <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_悬停.png"> </ImageBrush> </Setter.Value> </Setter> </Trigger> <Trigger Property="IsPressed" Value="true"> <Setter Property="Background" > <Setter.Value> <ImageBrush ImageSource="pack://application:,,,/MECF.Framework.Common;component/Resources/Main/主菜单按钮_点击.png"> </ImageBrush> </Setter.Value> </Setter> </Trigger> </Style.Triggers> </Style> </Window.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="104"/> <RowDefinition /> <RowDefinition Height="50"/> </Grid.RowDefinitions> <ContentControl x:Name="Top_Frame" Grid.Row="0" prism:RegionManager.RegionName="TopRegion"/> <ContentControl x:Name="Main_Frame" Grid.Row="1" prism:RegionManager.RegionName="MainRegion" MouseDoubleClick="Window_MouseDoubleClick"/> <StackPanel x:Name="Bottom_Frame" Grid.Row="2" Background="White" Orientation="Horizontal"/> </Grid> </Window>