WPF 模拟迅雷TabControl界面

WPF模拟迅雷TabControl界面

点击查看下载

WPF 模拟迅雷TabControl界面

WPF 模拟迅雷TabControl界面

<!--TabControl样式-->
<Style x:Key="TabControlStyle" TargetType="{x:Type TabControl}">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Padding" Value="4,4,4,4"/>
<Setter Property="BorderThickness" Value=""/>
<Setter Property="BorderBrush" Value="{StaticResource TabControlNormalBorderBrush}"/>
<Setter Property="Background" Value="#F9F9F9"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
<Grid.ColumnDefinitions>
<ColumnDefinition x:Name="ColumnDefinition0" Width="0.192*" />
<ColumnDefinition x:Name="ColumnDefinition1" Width="0.808*"/>
</Grid.ColumnDefinitions>
<Border x:Name="ContentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="" KeyboardNavigation.TabIndex="" KeyboardNavigation.TabNavigation="Local" Grid.ColumnSpan="" Grid.RowSpan="" Width="Auto" Margin="">
<ContentPresenter x:Name="PART_SelectedContentHost" ContentSource="SelectedContent" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" Width="Auto" Margin=""/>
</Border>
<StackPanel x:Name="HeaderPanel" Margin="" IsItemsHost="True">
<StackPanel.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="#7AFFFFFF" Offset=""/>
<GradientStop Color="#42F0FCFF" Offset=""/>
</LinearGradientBrush>
</StackPanel.Background>
</StackPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="listTabItemStyle" TargetType="{x:Type TabItem}">
<Setter Property="FocusVisualStyle" Value="{StaticResource TabItemFocusVisual}"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="Padding" Value="6,1,6,1"/>
<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" Margin="">
<Border x:Name="Bd" BorderThickness="" Background="{x:Null}">
<TextBlock x:Name="textBlock" HorizontalAlignment="Stretch" Margin="58.75,0,0,0" TextWrapping="Wrap" VerticalAlignment="Center" Text="{TemplateBinding Header}"/>
</Border>
<Path x:Name="path" Data="M87.399999,0 L174.8,44.596669 L-5.0876247E-07,44.596669 z" Fill="White" Height="Auto" Margin="0,9.667,-1.583,9.667" Stretch="Fill" StrokeThickness="" Width="11.466" RenderTransformOrigin="0.5,0.5" VerticalAlignment="Stretch" HorizontalAlignment="Right" Visibility="Hidden">
<Path.RenderTransform>
<TransformGroup>
<ScaleTransform/>
<SkewTransform/>
<RotateTransform Angle="-90"/>
<TranslateTransform/>
</TransformGroup>
</Path.RenderTransform>
</Path>
<Rectangle x:Name="rectangle" Margin="27,2.25,0,2.75" StrokeThickness="" HorizontalAlignment="Left" Width="22.25" Fill="{TemplateBinding Background}"/>
</Grid>
<ControlTemplate.Triggers>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True"/>
<Condition Property="Selector.IsSelected" Value="False"/>
</MultiTrigger.Conditions>
<Setter
Property="CornerRadius" TargetName="Bd" Value=""/>
<Setter
Property="BorderBrush" TargetName="Bd" Value="#562C94AF"/>
<Setter
Property="Margin" TargetName="Bd" Value=""/>
<Setter
Property="BorderThickness" TargetName="Bd" Value=""/>
<Setter
Property="Background" TargetName="Bd">
<Setter.Value
>
<LinearGradientBrush
EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop
Color="#2690D9FF" Offset=""/>
<GradientStop
Color="#47FFFFFF" Offset=""/>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</MultiTrigger>
<Trigger Property="IsSelected" Value="true">
<Setter Property="Panel.ZIndex" Value=""/>
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<RadialGradientBrush RadiusX="0.641" RadiusY="1.243">
<GradientStop Color="#FF6D9EC4" Offset=""/>
<GradientStop Color="#FFD4E0EB" Offset=""/>
</RadialGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="Visibility" TargetName="path" Value="Visible"/>
<Setter Property="Foreground" TargetName="textBlock" Value="White"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="Bd" Value="{StaticResource TabItemDisabledBackground}"/>
<Setter Property="BorderBrush" TargetName="Bd" Value="{StaticResource TabItemDisabledBorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

转载:http://blog.csdn.net/cmis7645/article/details/7566813

上一篇:Django2.2 Mysql数据表一对一映射(字段绑定) --Model拓展学习笔记shen


下一篇:修改Nginx的header伪装服务器