You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			121 lines
		
	
	
		
			6.1 KiB
		
	
	
	
		
			Plaintext
		
	
		
		
			
		
	
	
			121 lines
		
	
	
		
			6.1 KiB
		
	
	
	
		
			Plaintext
		
	
| 
											2 years ago
										 | <ResourceDictionary | ||
|  | 	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" mc:Ignorable="d"> | ||
|  | 	<SolidColorBrush x:Key="TabControlNormalBorderBrush" Color="#8C8E94"/> | ||
|  | 	<!-- 应该在此定义资源字典条目。--> | ||
|  | 	<Style x:Key="TabControlStyle" TargetType="{x:Type TabControl}"> | ||
|  | 		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/> | ||
|  | 		<Setter Property="Padding" Value="0,2,0,0"/> | ||
|  | 		<Setter Property="BorderThickness" Value="0"/> | ||
|  | 		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/> | ||
|  | 		<Setter Property="Background" Value="#F9F9F9"/> | ||
|  |         <Setter Property="HorizontalContentAlignment" Value="Center"/> | ||
|  | 		<Setter Property="VerticalContentAlignment" Value="Center"/> | ||
|  | 	</Style> | ||
|  | 	<Style x:Key="TabItemFocusVisual"> | ||
|  | 		<Setter Property="Control.Template"> | ||
|  | 			<Setter.Value> | ||
|  | 				<ControlTemplate> | ||
|  | 					<Rectangle Margin="3,3,3,1" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/> | ||
|  | 				</ControlTemplate> | ||
|  | 			</Setter.Value> | ||
|  | 		</Setter> | ||
|  | 	</Style> | ||
|  | 	<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0"> | ||
|  | 		<GradientStop Color="#F3F3F3" Offset="0"/> | ||
|  | 		<GradientStop Color="#EBEBEB" Offset="0.5"/> | ||
|  | 		<GradientStop Color="#DDDDDD" Offset="0.5"/> | ||
|  | 		<GradientStop Color="#CDCDCD" Offset="1"/> | ||
|  | 	</LinearGradientBrush> | ||
|  |     <LinearGradientBrush x:Key="TabItemHotBackground" EndPoint="0,1" StartPoint="0,0"> | ||
|  |         <GradientStop Color="#EAF6FD" Offset="0.15"/> | ||
|  |         <GradientStop Color="#D9F0FC" Offset=".5"/> | ||
|  |         <GradientStop Color="#BEE6FD" Offset=".5"/> | ||
|  |         <GradientStop Color="#A7D9F5" Offset="1"/> | ||
|  |     </LinearGradientBrush> | ||
|  |     <ImageBrush x:Key="SelectBrush" ImageSource="pack://application:,,,/Resources/images/bg.png" Stretch="Fill"/> | ||
|  |     <ImageBrush x:Key="FocosBrush" ImageSource="pack://application:,,,/Resources/images/fg.png" Stretch="Fill"/> | ||
|  | 
 | ||
|  |     <SolidColorBrush x:Key="TabItemSelectedBackground" Color="#F9F9F9"/> | ||
|  | 	<SolidColorBrush x:Key="TabItemHotBorderBrush" Color="#3C7FB1"/> | ||
|  | 	<SolidColorBrush x:Key="TabItemDisabledBackground" Color="#F4F4F4"/> | ||
|  | 	<SolidColorBrush x:Key="TabItemDisabledBorderBrush" Color="#FFC9C7BA"/> | ||
|  | 	<Style x:Key="TabItemStyle" TargetType="{x:Type TabItem}"> | ||
|  |         <Setter Property="Margin" Value="-2,-2,2,2"/> | ||
|  | 		<Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/> | ||
|  | 		<Setter Property="Foreground" Value="Black"/> | ||
|  | 		<Setter Property="Padding" Value="0"/> | ||
|  | 		<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/> | ||
|  | 		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/> | ||
|  | 		<Setter Property="HorizontalContentAlignment" Value="Stretch"/> | ||
|  | 		<Setter Property="VerticalContentAlignment" Value="Stretch"/> | ||
|  | 		<Setter Property="Template"> | ||
|  | 			<Setter.Value> | ||
|  | 				<ControlTemplate TargetType="{x:Type TabItem}"> | ||
|  | 					<Grid SnapsToDevicePixels="true"> | ||
|  |                         <Grid.ColumnDefinitions> | ||
|  |                             <ColumnDefinition Width="0.4*"/> | ||
|  |                             <ColumnDefinition Width="0.8*"/> | ||
|  |                         </Grid.ColumnDefinitions> | ||
|  |                         <Border x:Name="Bd" BorderThickness="0" CornerRadius="0" BorderBrush="Black" Margin="0" Grid.ColumnSpan="2" Visibility="Hidden" Background="#35adfc"> | ||
|  | 							<!--<Border.Background> | ||
|  |                                 <ImageBrush ImageSource="pack://application:,,,/Resources/theme/skin/ico/toolbar_pushed.png"/> | ||
|  | 							</Border.Background>--> | ||
|  | 						</Border> | ||
|  |                         <Border x:Name="fg" BorderThickness="0" CornerRadius="0" BorderBrush="Black" Margin="0" Grid.ColumnSpan="2" Visibility="Hidden" RenderTransformOrigin="0.5,0.5" Background="#35adfc"> | ||
|  | 							<Border.RenderTransform> | ||
|  | 								<TransformGroup> | ||
|  | 									<ScaleTransform/> | ||
|  | 									<SkewTransform/> | ||
|  | 									<RotateTransform/> | ||
|  | 									<TranslateTransform/> | ||
|  | 								</TransformGroup> | ||
|  | 							</Border.RenderTransform> | ||
|  |                              | ||
|  | 							<!--<Border.Background> | ||
|  |                                 <ImageBrush ImageSource="pack://application:,,,/Resources/theme/skin/ico/toolbar_hover.png"/> | ||
|  | 							</Border.Background>--> | ||
|  | 						</Border> | ||
|  | 						<TextBlock TextWrapping="Wrap" FontSize="26" VerticalAlignment="Center"  Grid.Column="1" HorizontalAlignment="Center" Text="{TemplateBinding Header}" Foreground="White"/> | ||
|  | 						<Border x:Name="ico" BorderThickness="0" CornerRadius="3" BorderBrush="Black" Margin="4" Grid.RowSpan="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="48" Height="48" Background="{TemplateBinding Background}" RenderTransformOrigin="0.5,0.5"> | ||
|  | 							<Border.RenderTransform> | ||
|  | 								<TransformGroup> | ||
|  | 									<ScaleTransform/> | ||
|  | 									<SkewTransform/> | ||
|  | 									<RotateTransform/> | ||
|  | 									<TranslateTransform/> | ||
|  | 								</TransformGroup> | ||
|  | 							</Border.RenderTransform> | ||
|  | 						</Border> | ||
|  | 					</Grid> | ||
|  | 				 | ||
|  |                     <ControlTemplate.Triggers> | ||
|  | 						<Trigger Property="IsMouseOver" Value="true"/> | ||
|  | 						<Trigger Property="IsSelected" Value="true"> | ||
|  | 							<Setter Property="Visibility" TargetName="Bd" Value="Visible"/> | ||
|  | 							<Setter Property="Panel.ZIndex" TargetName="ico" Value="1"/> | ||
|  | 						</Trigger> | ||
|  | 						<MultiTrigger> | ||
|  | 							<MultiTrigger.Conditions> | ||
|  | 								<Condition Property="IsSelected" Value="false"/> | ||
|  | 								<Condition Property="IsMouseOver" Value="true"/> | ||
|  | 							</MultiTrigger.Conditions> | ||
|  | 							<Setter Property="Visibility" TargetName="fg" Value="Visible"/> | ||
|  | 							<Setter Property="RenderTransform" TargetName="ico"> | ||
|  | 								<Setter.Value> | ||
|  | 									<TransformGroup> | ||
|  | 										<ScaleTransform ScaleX="1.05" ScaleY="1.05"/> | ||
|  | 										<SkewTransform/> | ||
|  | 										<RotateTransform/> | ||
|  | 										<TranslateTransform/> | ||
|  | 									</TransformGroup> | ||
|  | 								</Setter.Value> | ||
|  | 							</Setter> | ||
|  | 						</MultiTrigger> | ||
|  | 						<Trigger Property="IsEnabled" Value="false"/> | ||
|  | 					</ControlTemplate.Triggers> | ||
|  | 				</ControlTemplate> | ||
|  | 			</Setter.Value> | ||
|  | 		</Setter> | ||
|  | 	</Style> | ||
|  | </ResourceDictionary> |