1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
| <GradientStopCollection x:Key="Reflection">
<GradientStop Offset="0.00" Color="#88FFFFFF" />
<GradientStop Offset="0.20" Color="#66FFFFFF" />
<GradientStop Offset="0.55" Color="#33FFFFFF" />
<GradientStop Offset="0.56" Color="#00FFFFFF" />
<GradientStop Offset="1.00" Color="#22FFFFFF" />
</GradientStopCollection>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1" x:Key="Refl" GradientStops="{StaticResource Reflection}" />
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0" x:Key="ReflV" GradientStops="{StaticResource Reflection}" />
<Style TargetType="Button" x:Key="ClearBtn">
<Setter Property="Background" Value="#20000000" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="3" />
<Setter Property="BorderThickness" Value="1" />
<Setter Property="BorderBrush" Value="#30000000" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border IsHitTestVisible="True">
<Grid>
<Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}" CornerRadius="2" Margin="0" SnapsToDevicePixels="True"
Name="Hover" Opacity="0">
<Border CornerRadius="1" Background="{StaticResource Refl}">
<Border BorderBrush="#30FFFFFF" BorderThickness="1" CornerRadius="0">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="-1">
<Border Opacity="1" Name="HoverHost">
<Border CornerRadius="1" Background="#40FFFFFF" Opacity="0" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" />
</Border>
<Border CornerRadius="1" Name="Pressed" Background="#40000000" Opacity="0"
HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
</Grid>
</Border>
</Border>
</Border>
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Name="Presenter"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="{TemplateBinding Padding}">
</ContentPresenter>
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Pressed" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.1" To="0.3" />
<DoubleAnimation Storyboard.TargetName="HoverHost" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.1" To="0" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Pressed" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.3" To="0" />
<DoubleAnimation Storyboard.TargetName="HoverHost" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.3" To="1" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Hover" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.1" To="1" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Hover" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.3" To="0" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Presenter" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.3" To="0.5" />
</Storyboard>
</BeginStoryboard>
</Trigger.EnterActions>
<Trigger.ExitActions>
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetName="Presenter" Storyboard.TargetProperty="Opacity"
Duration="0:0:0.3" To="1.0" />
</Storyboard>
</BeginStoryboard>
</Trigger.ExitActions>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TabControl" x:Key="MainTabControl">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabControl">
<Grid SnapsToDevicePixels="True">
<Grid.RowDefinitions>
<RowDefinition Height="20" />
<RowDefinition />
</Grid.RowDefinitions>
<Border Background="#FCFCFC" BorderBrush="#4C4E44" BorderThickness="1" CornerRadius="0,4,4,4" Grid.Row="1"
Name="RootBorder">
<ContentPresenter Name="PART_SelectedContentHost" ContentSource="SelectedContent" />
</Border>
<DockPanel HorizontalAlignment="Left">
<Border DockPanel.Dock="Right" Margin="1" BorderBrush="#40FFFFFF" BorderThickness="1"
Background="#20000000" VerticalAlignment="Center" CornerRadius="3">
<Button Width="15" Height="15" Command="New" Style="{StaticResource ClearBtn}" Padding="2">
<Path Stroke="#F0FFFFFF" StrokeThickness="2" Data="M 5,0 5,10 M 0,5 10,5" Stretch="Uniform" />
</Button>
</Border>
<UniformGrid Rows="1" IsItemsHost="True" />
</DockPanel>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="SelectedItem" Value="{x:Null}">
<Setter TargetName="RootBorder" Property="CornerRadius" Value="4" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="ItemContainerStyle">
<Setter.Value>
<Style TargetType="TabItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TabItem">
<Border Opacity="0.7" Name="RootGrid">
<Border BorderBrush="#4C4E44" BorderThickness="1,1,1,0" HorizontalAlignment="Stretch"
Name="RootElement" CornerRadius="3,3,0,0" SnapsToDevicePixels="True" Opacity="0.7"
Margin="-1,2,0,0">
<Border.Background>
<LinearGradientBrush EndPoint="0,1">
<GradientStop Offset="0" Color="Black" />
<GradientStop Offset="0.9" Color="White" />
</LinearGradientBrush>
</Border.Background>
<Grid Margin="4,0" HorizontalAlignment="Stretch" VerticalAlignment="Center">
<ContentPresenter ContentSource="Header" Margin="0,0,17,0" Width="100" />
<Button DockPanel.Dock="Right" Width="15" Height="15" Command="Close" Margin="1,0"
Style="{StaticResource ClearBtn}" Visibility="Visible" Name="CloseBtn"
HorizontalAlignment="Right" VerticalAlignment="Center">
<Path Stroke="#80000000" StrokeThickness="2" Data="M 0,0 10,10 M 10,0 0,10" Stretch="Uniform" />
</Button>
</Grid>
</Border>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter TargetName="RootElement" Property="Margin" Value="-1,0,0,-1" />
<Setter TargetName="RootElement" Property="Opacity" Value="1" />
<Setter TargetName="RootGrid" Property="Opacity" Value="1" />
<Setter Property="Panel.ZIndex" Value="1" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="RootGrid" Property="Opacity" Value="1" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Setter.Value>
</Setter>
</Style> |
Partager