117 lines
5.4 KiB
XML
117 lines
5.4 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:converters="clr-namespace:Qrakhen.TilingFrames.Converters"
|
|
xmlns:local="clr-namespace:Qrakhen.TilingFrames.Controls"
|
|
xmlns:models="clr-namespace:Qrakhen.TilingFrames.Models">
|
|
|
|
<Style TargetType="{x:Type local:HostControl}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type local:HostControl}">
|
|
<Border Padding="0"
|
|
CornerRadius="4"
|
|
BorderBrush="{DynamicResource Brush_Border_Primary}"
|
|
BorderThickness="1">
|
|
<TabControl ItemsSource="{Binding Frames}"
|
|
SelectedItem="{Binding ActiveFrame, Mode=TwoWay}">
|
|
<TabControl.ItemTemplate>
|
|
<DataTemplate>
|
|
<Grid Background="Transparent">
|
|
<TextBlock Text="{Binding HeaderText}" />
|
|
</Grid>
|
|
</DataTemplate>
|
|
</TabControl.ItemTemplate>
|
|
|
|
<TabControl.ContentTemplate>
|
|
<DataTemplate>
|
|
<ContentPresenter Content="{Binding}" />
|
|
</DataTemplate>
|
|
</TabControl.ContentTemplate>
|
|
|
|
<TabControl.Style>
|
|
<Style TargetType="TabControl">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabControl">
|
|
<Border CornerRadius="4">
|
|
<Grid KeyboardNavigation.TabNavigation="Local"
|
|
Background="{DynamicResource Brush_Background_Primary}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border CornerRadius="4"
|
|
Background="{DynamicResource Brush_Background_Secondary}">
|
|
<TabPanel Grid.Row="0"
|
|
IsItemsHost="True"
|
|
KeyboardNavigation.TabIndex="1"
|
|
Margin="0,0,0,-1" />
|
|
</Border>
|
|
|
|
<Border x:Name="ActiveContent"
|
|
Grid.Row="1"
|
|
BorderThickness="0"
|
|
AllowDrop="True"
|
|
Padding="4"
|
|
BorderBrush="{DynamicResource Brush_Border_Primary}"
|
|
Background="Transparent">
|
|
<ContentPresenter ContentSource="SelectedContent"
|
|
KeyboardNavigation.TabNavigation="Cycle"
|
|
KeyboardNavigation.DirectionalNavigation="Contained" />
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</TabControl.Style>
|
|
</TabControl>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<DataTemplate DataType="{x:Type models:TilingHost}">
|
|
<local:HostControl />
|
|
</DataTemplate>
|
|
|
|
<Style TargetType="TabItem">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TabItem">
|
|
<Border x:Name="TemplateBorder"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
Cursor="Hand"
|
|
Margin="0"
|
|
Padding="8,4"
|
|
MinWidth="48"
|
|
CornerRadius="4"
|
|
BorderThickness="1">
|
|
|
|
<ContentPresenter x:Name="ContentSite"
|
|
ContentSource="Header"
|
|
VerticalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
RecognizesAccessKey="True" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="ContentSite" Property="TextElement.Foreground" Value="{DynamicResource Brush_Text_Primary}" />
|
|
<Setter TargetName="TemplateBorder" Property="BorderBrush" Value="{DynamicResource Brush_Accent_Primary}" />
|
|
<Setter TargetName="TemplateBorder" Property="Background" Value="Transparent" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="TemplateBorder" Property="Background" Value="{DynamicResource Brush_Background_Primary_Tint}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Foreground" Value="{DynamicResource Brush_Text_Grey}" />
|
|
</Style>
|
|
|
|
</ResourceDictionary> |