mirror of
https://github.com/DarthAffe/RGBSyncPlus
synced 2025-12-13 09:28:31 +00:00
181 lines
11 KiB
XML
181 lines
11 KiB
XML
<styles:CachedResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:styles="clr-namespace:RGBSyncPlus.Styles"
|
|
xmlns:controls="clr-namespace:Transitionals.Controls;assembly=Transitionals"
|
|
xmlns:transitions="clr-namespace:Transitionals.Transitions;assembly=Transitionals">
|
|
|
|
<styles:CachedResourceDictionary.MergedDictionaries>
|
|
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/FrameworkElement.xaml" />
|
|
<styles:CachedResourceDictionary Source="/RGBSync+;component/Styles/Theme.xaml" />
|
|
</styles:CachedResourceDictionary.MergedDictionaries>
|
|
|
|
<transitions:FadeTransition x:Key="TransitionFade" Duration="0:0:0.200" />
|
|
|
|
<Style x:Key="StyleTabControlNavigation"
|
|
TargetType="TabControl">
|
|
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Margin" Value="0,-72,0,0" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
|
|
<!-- DarthAffe 04.08.2017: The TabControl is a shitty one to style - if unused parts are removed it throws exceptions ... -->
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabControl">
|
|
<Grid ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="ColumnDefinition0" />
|
|
<ColumnDefinition x:Name="ColumnDefinition1" Width="0" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition x:Name="RowDefinition0" Height="Auto" />
|
|
<RowDefinition x:Name="RowDefinition1" Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<TabPanel x:Name="HeaderPanel"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Margin="82,2,2,0"
|
|
Panel.ZIndex="1"
|
|
IsItemsHost="true"
|
|
KeyboardNavigation.TabIndex="1" />
|
|
<Border x:Name="ContentPanel"
|
|
Grid.Column="0"
|
|
Grid.Row="1"
|
|
Margin="4"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Background="{TemplateBinding Background}"
|
|
KeyboardNavigation.DirectionalNavigation="Contained"
|
|
KeyboardNavigation.TabIndex="2"
|
|
KeyboardNavigation.TabNavigation="Local">
|
|
<controls:TransitionElement x:Name="PART_SelectedContentHost"
|
|
Margin="{TemplateBinding Padding}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
Transition="{StaticResource TransitionFade}"
|
|
Content="{TemplateBinding SelectedContent}" />
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="TabStripPlacement" Value="Bottom">
|
|
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="1" />
|
|
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
|
|
<Setter Property="Height" TargetName="RowDefinition0" Value="*" />
|
|
<Setter Property="Height" TargetName="RowDefinition1" Value="Auto" />
|
|
<Setter Property="Margin" TargetName="HeaderPanel" Value="2,0,2,2" />
|
|
</Trigger>
|
|
<Trigger Property="TabStripPlacement" Value="Left">
|
|
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
|
|
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
|
|
<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="0" />
|
|
<Setter Property="Grid.Column" TargetName="ContentPanel" Value="1" />
|
|
<Setter Property="Width" TargetName="ColumnDefinition0" Value="Auto" />
|
|
<Setter Property="Width" TargetName="ColumnDefinition1" Value="*" />
|
|
<Setter Property="Height" TargetName="RowDefinition0" Value="*" />
|
|
<Setter Property="Height" TargetName="RowDefinition1" Value="0" />
|
|
<Setter Property="Margin" TargetName="HeaderPanel" Value="2,2,0,2" />
|
|
</Trigger>
|
|
<Trigger Property="TabStripPlacement" Value="Right">
|
|
<Setter Property="Grid.Row" TargetName="HeaderPanel" Value="0" />
|
|
<Setter Property="Grid.Row" TargetName="ContentPanel" Value="0" />
|
|
<Setter Property="Grid.Column" TargetName="HeaderPanel" Value="1" />
|
|
<Setter Property="Grid.Column" TargetName="ContentPanel" Value="0" />
|
|
<Setter Property="Width" TargetName="ColumnDefinition0" Value="*" />
|
|
<Setter Property="Width" TargetName="ColumnDefinition1" Value="Auto" />
|
|
<Setter Property="Height" TargetName="RowDefinition0" Value="*" />
|
|
<Setter Property="Height" TargetName="RowDefinition1" Value="0" />
|
|
<Setter Property="Margin" TargetName="HeaderPanel" Value="0,2,2,2" />
|
|
</Trigger>
|
|
<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="StyleTabItemNavigation"
|
|
BasedOn="{StaticResource StyleFrameworkElement}"
|
|
TargetType="TabItem">
|
|
|
|
<Setter Property="Height" Value="72" />
|
|
<Setter Property="FontSize" Value="{StaticResource FontSizeNavigation}" />
|
|
<Setter Property="FontFamily" Value="pack://application:,,,/Resources/#Cinzel Decorative" />
|
|
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabItem">
|
|
<Border Margin="8,0"
|
|
Padding="4"
|
|
IsHitTestVisible="True"
|
|
BorderThickness="0"
|
|
Background="Transparent">
|
|
<Grid>
|
|
<TextBlock x:Name="TxtBlurred"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
FontWeight="Black"
|
|
Opacity="0"
|
|
Foreground="{StaticResource BrushNavigationItemBlur}"
|
|
Text="{TemplateBinding Header}">
|
|
<TextBlock.Effect>
|
|
<BlurEffect Radius="{StaticResource DoubleNavigationBlurRadius}" />
|
|
</TextBlock.Effect>
|
|
</TextBlock>
|
|
<TextBlock VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
Foreground="{StaticResource BrushNavigationItem}"
|
|
Text="{TemplateBinding Header}" />
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<!--<DataTrigger Binding="{Binding RelativeSource={RelativeSource PreviousData}}" Value="{x:Null}">
|
|
<Setter Property="Margin" Value="80,0,0,0" />
|
|
</DataTrigger>-->
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard TargetName="TxtBlurred">
|
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.5" Duration="0:0:0.150" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard TargetName="TxtBlurred">
|
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.250" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard TargetName="TxtBlurred">
|
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1.0" Duration="0:0:0.150" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard TargetName="TxtBlurred">
|
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:0.250" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style BasedOn="{StaticResource StyleTabItemNavigation}" TargetType="TabItem" />
|
|
|
|
</styles:CachedResourceDictionary>
|
|
|
|
|
|
|
|
|