mirror of
https://gitee.com/akwkevin/aistudio.-wpf.-diagram
synced 2026-04-13 12:46:36 +08:00
804 lines
60 KiB
XML
804 lines
60 KiB
XML
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:dragablz="clr-namespace:Dragablz"
|
|
xmlns:dockablz="clr-namespace:Dragablz.Dockablz"
|
|
xmlns:converters="clr-namespace:Dragablz.Converters"
|
|
xmlns:local="clr-namespace:Dragablz.Themes">
|
|
|
|
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
|
|
<converters:EqualityToVisibilityConverter x:Key="EqualityToVisibilityConverter" />
|
|
<converters:BooleanAndToVisibilityConverter x:Key="BooleanAndToVisibilityConverter" />
|
|
<converters:EqualityToBooleanConverter x:Key="EqualityToBooleanConverter" />
|
|
<converters:ShowDefaultCloseButtonConverter x:Key="ShowDefaultCloseButtonConverter" />
|
|
<local:BrushToRadialGradientBrushConverter x:Key="BrushToRadialGradientBrushConverter" />
|
|
|
|
<Style x:Key="MaterialDesignFocusVisual">
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Thumb}" x:Key="MaterialDesignInvisibleThumbStyle">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Grid Background="{TemplateBinding Background}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="MaterialDesignMenuCommandButtonStyle">
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Padding" Value="1"/>
|
|
<Setter Property="Opacity" Value=".8"/>
|
|
<Setter Property="Width" Value="24"/>
|
|
<Setter Property="Height" Value="20"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
|
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsDefaulted" Value="true">
|
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Opacity" TargetName="border" Value=".5"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Background" Value="{x:Static dragablz:DragablzColors.WindowGlassBrush}"/>
|
|
<Setter Property="Foreground" Value="{x:Static SystemColors.HighlightTextBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter Property="Opacity" Value="1"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="MaterialDesignCloseItemCommandButtonStyle" BasedOn="{StaticResource MaterialDesignMenuCommandButtonStyle}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Grid>
|
|
<Ellipse Width="{TemplateBinding Width}"
|
|
Height="{TemplateBinding Height}"
|
|
Fill="{TemplateBinding Background}"/>
|
|
<Path x:Name="Path"
|
|
Data="M0.5,71 L70,0.5 M0.5,1 L70,70.5"
|
|
Width="6" Height="6"
|
|
Stretch="Uniform"
|
|
Stroke="{TemplateBinding Foreground}"
|
|
StrokeThickness="1.5"
|
|
StrokeStartLineCap="Square"
|
|
StrokeEndLineCap="Square"
|
|
SnapsToDevicePixels="True" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
<Setter Property="Width" Value="12" />
|
|
<Setter Property="Height" Value="12" />
|
|
<Setter Property="Margin" Value="4 0 2 0" />
|
|
<Setter Property="Opacity" Value=".75" />
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type Button}" x:Key="MaterialDesignAddItemCommandButtonStyle" BasedOn="{StaticResource MaterialDesignMenuCommandButtonStyle}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Grid>
|
|
<Ellipse Width="{TemplateBinding Width}"
|
|
Height="{TemplateBinding Height}"
|
|
Fill="{TemplateBinding Background}"/>
|
|
<Path x:Name="Path"
|
|
Data="M38,6L38.0003451911513,70.6666666666666 M70.3336667356886,38L5.50002465137562,38"
|
|
Width="6" Height="6"
|
|
Stretch="Uniform"
|
|
Stroke="{TemplateBinding Foreground}"
|
|
StrokeThickness="1.5"
|
|
StrokeStartLineCap="Square"
|
|
StrokeEndLineCap="Square"
|
|
SnapsToDevicePixels="True" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Background" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
<Setter Property="Width" Value="12" />
|
|
<Setter Property="Height" Value="12" />
|
|
<Setter Property="Margin" Value="4 0 2 0" />
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
|
|
|
|
<Style x:Key="MaterialDesignDragableTabItemStyle" TargetType="{x:Type dragablz:DragablzItem}">
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="local:MaterialDesignAssist.IndicatorBrush" Value="{DynamicResource SecondaryAccentBrush}" />
|
|
<Setter Property="Margin" Value="0 0 0 0"/>
|
|
<Setter Property="Padding" Value="8"/>
|
|
<Setter Property="MinWidth" Value="80" />
|
|
<Setter Property="Height" Value="40" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="TextBlock.FontWeight" Value="Medium" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
|
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
|
Background="{TemplateBinding Background}"
|
|
Margin="0 0 0 0">
|
|
<local:Ripple HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
|
|
x:Name="contentPresenter"
|
|
Margin="{TemplateBinding Control.Padding}"
|
|
Opacity=".87"/>
|
|
<Thumb Grid.Column="0" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch"
|
|
x:Name="PART_Thumb"
|
|
Style="{StaticResource MaterialDesignInvisibleThumbStyle}" />
|
|
<Button Grid.Column="1"
|
|
Style="{StaticResource MaterialDesignCloseItemCommandButtonStyle}"
|
|
Command="{x:Static dragablz:TabablzControl.CloseItemCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource ShowDefaultCloseButtonConverter}">
|
|
<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="ShowDefaultCloseButton" />
|
|
<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="FixedHeaderCount" />
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="LogicalIndex" />
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
</Button>
|
|
</Grid>
|
|
</local:Ripple>
|
|
</Border>
|
|
<Border x:Name="SelectionHighlightBorder" Background="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(local:MaterialDesignAssist.IndicatorBrush)}" Height="2"
|
|
Grid.Row="1"
|
|
Visibility="Hidden"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="dragablz:TabablzControl.IsWrappingTabItem" Value="True">
|
|
<Setter TargetName="contentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.Header}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="contentPresenter" Property="Opacity" Value="1"/>
|
|
<Setter TargetName="SelectionHighlightBorder" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="MaterialDesignDragableTabItemVerticalStyle" TargetType="{x:Type dragablz:DragablzItem}">
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource MaterialDesignFocusVisual}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
|
<Setter Property="Margin" Value="0 0 0 0"/>
|
|
<Setter Property="Width" Value="80" />
|
|
<Setter Property="MinHeight" Value="40" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="TextBlock.FontWeight" Value="Medium" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type dragablz:DragablzItem}">
|
|
<Grid x:Name="templateRoot" SnapsToDevicePixels="true">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}"
|
|
Background="{TemplateBinding Background}"
|
|
Margin="0 0 0 0">
|
|
<local:Ripple HorizontalContentAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
|
|
x:Name="contentPresenter"
|
|
RenderTransformOrigin=".5, .5">
|
|
<ContentPresenter.RenderTransform>
|
|
<RotateTransform Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(dragablz:DragablzItem.ContentRotateTransformAngle)}" />
|
|
</ContentPresenter.RenderTransform>
|
|
</ContentPresenter>
|
|
<Thumb Grid.Row="0" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch"
|
|
x:Name="PART_Thumb"
|
|
Style="{StaticResource MaterialDesignInvisibleThumbStyle}" />
|
|
<Button Grid.Row="1"
|
|
Style="{StaticResource MaterialDesignCloseItemCommandButtonStyle}"
|
|
Command="{x:Static dragablz:TabablzControl.CloseItemCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}">
|
|
<Button.Visibility>
|
|
<MultiBinding Converter="{StaticResource ShowDefaultCloseButtonConverter}">
|
|
<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="ShowDefaultCloseButton" />
|
|
<Binding RelativeSource="{RelativeSource FindAncestor, AncestorType={x:Type dragablz:TabablzControl}}" Path="FixedHeaderCount" />
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="LogicalIndex" />
|
|
</MultiBinding>
|
|
</Button.Visibility>
|
|
</Button>
|
|
</Grid>
|
|
</local:Ripple>
|
|
</Border>
|
|
<Border x:Name="SelectionHighlightBorder" Background="{DynamicResource SecondaryAccentBrush}" Width="2"
|
|
Grid.Column="1"
|
|
Visibility="Hidden"/>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="dragablz:TabablzControl.IsWrappingTabItem" Value="True">
|
|
<Setter TargetName="contentPresenter" Property="Content" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=DataContext.Header}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="contentPresenter" Property="Opacity" Value="1"/>
|
|
<Setter TargetName="SelectionHighlightBorder" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="MaterialDesignMetroBaseWindowButtonStyle" TargetType="{x:Type Button}">
|
|
<Setter Property="Background" Value="{DynamicResource TransparentWhiteBrush}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource WhiteColorBrush}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="Padding" Value="1" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Grid Background="{TemplateBinding Background}">
|
|
<ContentPresenter x:Name="contentPresenter"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
Margin="{TemplateBinding Padding}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
RecognizesAccessKey="True"
|
|
Opacity="0.75" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="contentPresenter" Property="Opacity" Value="1" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="False">
|
|
<Setter TargetName="contentPresenter" Property="Opacity" Value=".5" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource SemiTransparentWhiteBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource HighlightBrush}" />
|
|
<Setter Property="Foreground" Value="White" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Foreground" Value="#ADADAD" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="MaterialDesignToolWindowButtonStyle" TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignMetroBaseWindowButtonStyle}">
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Width" Value="30" />
|
|
<Setter Property="MaxHeight" Value="30" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type dragablz:HeaderedDragablzItem}" x:Key="MaterialDesignToolDragablzItemStyle">
|
|
<Style.Setters>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource AccentColorBrush2}" />
|
|
<Setter Property="BorderThickness" Value="4" />
|
|
<Setter Property="Canvas.Left" Value="{Binding X, RelativeSource={RelativeSource Self}}" />
|
|
<Setter Property="Canvas.Top" Value="{Binding Y, RelativeSource={RelativeSource Self}}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type dragablz:HeaderedDragablzItem}">
|
|
<Grid Margin="{TemplateBinding Margin}">
|
|
<Border Background="{DynamicResource WhiteColorBrush}">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="10" ShadowDepth="5" Direction="315" Color="{DynamicResource AccentColor2}" Opacity=".5" />
|
|
</Border.Effect>
|
|
</Border>
|
|
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
|
|
<DockPanel>
|
|
<Grid DockPanel.Dock="Top" Background="{TemplateBinding BorderBrush}">
|
|
<Thumb HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" x:Name="PART_Thumb"
|
|
Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
/>
|
|
<DockPanel Margin="{TemplateBinding Control.Padding }">
|
|
<Button DockPanel.Dock="Right"
|
|
Command="{x:Static dockablz:Layout.CloseFloatingItem}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
|
|
Margin="1 0 0 0"
|
|
Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
|
|
Focusable="False"
|
|
RenderOptions.EdgeMode="Aliased"
|
|
>
|
|
<Path Data="M 10.009,1.704 L 8.331,0.026 5.03,3.327 1.703,0 0,1.704 3.326,5.031 0.025,8.332 1.703,10.009 5.004,6.708 8.305,10.009 10.009,8.305 6.708,5.005"
|
|
SnapsToDevicePixels="True"
|
|
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" />
|
|
</Button>
|
|
<Button DockPanel.Dock="Right"
|
|
Command="{x:Static dockablz:Layout.UnfloatItemCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
|
|
Margin="1 0 0 0"
|
|
Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
|
|
>
|
|
<Path Width="12" Height="12" Stretch="UniformToFill" Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" Data="M 19 19 H 5 V 5 h 7 V 3 H 5 C 3.89 3 3 3.9 3 5 v 14 c 0 1.1 0.89 2 2 2 h 14 c 1.1 0 2 -0.9 2 -2 v -7 h -2 v 7 z M 14 3 v 2 h 3.59 L 7.76 14.83 9.17 16.24 19 6.41 V 10 h 2 V 3 h -7 z" />
|
|
</Button>
|
|
<Button DockPanel.Dock="Right"
|
|
Command="{x:Static dockablz:Layout.MaximiseFloatingItem}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
|
|
Margin="1 0 0 0"
|
|
Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
|
|
>
|
|
<Path Width="10"
|
|
Height="10"
|
|
Data="F1M0,0L0,9 9,9 9,0 0,0 0,3 8,3 8,8 1,8 1,3z"
|
|
SnapsToDevicePixels="True"
|
|
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" />
|
|
</Button>
|
|
<Button DockPanel.Dock="Right"
|
|
Command="{x:Static dockablz:Layout.RestoreFloatingItem}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource TemplatedParent}}"
|
|
Margin="1 0 0 0"
|
|
Style="{DynamicResource MaterialDesignToolWindowButtonStyle}"
|
|
>
|
|
<Path Width="10"
|
|
Height="10"
|
|
Data="F1M0,10L0,3 3,3 3,0 10,0 10,2 4,2 4,3 7,3 7,6 6,6 6,5 1,5 1,10z M1,10L7,10 7,7 10,7 10,2 9,2 9,6 6,6 6,9 1,9z"
|
|
SnapsToDevicePixels="True"
|
|
Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType=Button}}" />
|
|
</Button>
|
|
<ContentPresenter Content="{TemplateBinding HeaderContent}"
|
|
ContentTemplate="{TemplateBinding HeaderContentTemplate}"
|
|
ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}"
|
|
ContentTemplateSelector="{TemplateBinding HeaderContentTemplateSelector}"
|
|
SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
|
|
IsHitTestVisible="False"
|
|
/>
|
|
</DockPanel>
|
|
</Grid>
|
|
<ContentPresenter Content="{TemplateBinding ContentControl.Content}" ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" ContentStringFormat="{TemplateBinding ContentControl.ContentStringFormat}" HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
|
|
Margin="{TemplateBinding Control.Padding }"/>
|
|
</DockPanel>
|
|
</Border>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Left}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="Left"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch"
|
|
Cursor="SizeWE"
|
|
/>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Top}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="Top"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top"
|
|
Cursor="SizeNS"
|
|
/>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="Right"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Stretch"
|
|
Cursor="SizeWE"
|
|
/>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="Bottom"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Bottom"
|
|
Cursor="SizeNS"
|
|
/>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="TopLeft"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
Cursor="SizeNWSE"
|
|
/>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="TopRight"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Cursor="SizeNESW"
|
|
/>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="BottomRight"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Bottom"
|
|
Cursor="SizeNWSE"
|
|
/>
|
|
<Thumb Style="{StaticResource MaterialDesignInvisibleThumbStyle}"
|
|
Width="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Right}"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=BorderThickness.Bottom}"
|
|
IsEnabled="{Binding Path=(dockablz:Layout.FloatingItemState), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource EqualityToBooleanConverter}, ConverterParameter={x:Static WindowState.Normal}}"
|
|
dragablz:DragablzItem.SizeGrip="BottomLeft"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Bottom"
|
|
Cursor="SizeNESW"
|
|
/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style.Setters>
|
|
<Style.Triggers>
|
|
<Trigger Property="dockablz:Layout.FloatingItemState" Value="Maximized">
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Canvas.Left" Value="0" />
|
|
<Setter Property="Canvas.Top" Value="0" />
|
|
<Setter Property="Width" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type dockablz:Layout}}, Path=ActualWidth}" />
|
|
<Setter Property="Height" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type dockablz:Layout}}, Path=ActualHeight}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<ControlTemplate x:Key="TabablzScrollViewerControlTemplate" TargetType="{x:Type ScrollViewer}">
|
|
<Grid x:Name="Grid" Background="{TemplateBinding Background}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
|
|
<ScrollBar x:Name="PART_VerticalScrollBar" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Grid.Column="0" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="1" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}"
|
|
Margin="0 1 0 0" />
|
|
<ScrollBar x:Name="PART_HorizontalScrollBar" AutomationProperties.AutomationId="HorizontalScrollBar" Cursor="Arrow" Grid.Column="1" Maximum="{TemplateBinding ScrollableWidth}" Minimum="0" Orientation="Horizontal" Grid.Row="0" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}" Value="{Binding HorizontalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportWidth}"
|
|
Margin="1 0 0 0" />
|
|
</Grid>
|
|
</ControlTemplate>
|
|
|
|
<Style TargetType="{x:Type dragablz:DragablzItemsControl}" x:Key="TabablzDragablzItemsControlStyle">
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="ItemsPanel">
|
|
<Setter.Value>
|
|
<ItemsPanelTemplate>
|
|
<Canvas IsItemsHost="True" />
|
|
</ItemsPanelTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type dragablz:DragablzItemsControl}">
|
|
<Border BorderThickness="{TemplateBinding Border.BorderThickness}" Padding="{TemplateBinding Control.Padding}" BorderBrush="{TemplateBinding Border.BorderBrush}" Background="{TemplateBinding Panel.Background}" SnapsToDevicePixels="True">
|
|
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto"
|
|
Width="{TemplateBinding ActualWidth}"
|
|
Height="{TemplateBinding ActualHeight}"
|
|
Template="{StaticResource TabablzScrollViewerControlTemplate}">
|
|
<ItemsPresenter SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
Width="{TemplateBinding ItemsPresenterWidth}"
|
|
Height="{TemplateBinding ItemsPresenterHeight}"/>
|
|
</ScrollViewer>
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="StandardEmbeddedButtonStyle" TargetType="{x:Type Button}">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
|
|
<ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsDefaulted" Value="true">
|
|
<Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type dragablz:TabablzControl}" x:Key="MaterialDesignTabablzControlStyle">
|
|
<Setter Property="Background" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Window}, Path=Background}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
<Setter Property="TextElement.Foreground" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=Window}, Path=(TextElement.Foreground)}" />
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource MaterialDesignDragableTabItemStyle}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type dragablz:TabablzControl}">
|
|
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition x:Name="RowDefinition0" Height="Auto"/>
|
|
<RowDefinition x:Name="RowDefinition1" Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
<Border x:Name="contentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="0" KeyboardNavigation.DirectionalNavigation="Contained" Grid.Row="1" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local"
|
|
Margin="0 -1 0 0">
|
|
<Grid x:Name="PART_ItemsHolder" />
|
|
</Border>
|
|
<Grid Grid.Column="0" Grid.Row="0" x:Name="HeaderContainerGrid" Visibility="{TemplateBinding IsHeaderPanelVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<Grid.Resources>
|
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource StandardEmbeddedButtonStyle}"></Style>
|
|
</Grid.Resources>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border Background="{TemplateBinding BorderBrush}" Grid.ColumnSpan="4">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="270" Opacity=".5" />
|
|
</Border.Effect>
|
|
</Border>
|
|
<ContentControl Grid.Column="0" x:Name="PrefixContentControl"
|
|
Content="{TemplateBinding HeaderPrefixContent}"
|
|
ContentStringFormat="{TemplateBinding HeaderPrefixContentStringFormat}"
|
|
ContentTemplate="{TemplateBinding HeaderPrefixContentStringFormat}"
|
|
ContentTemplateSelector="{TemplateBinding HeaderPrefixContentTemplateSelector}"/>
|
|
<dragablz:DragablzItemsControl x:Name="PART_HeaderItemsControl"
|
|
Grid.Column="1"
|
|
FixedItemCount="{TemplateBinding FixedHeaderCount}"
|
|
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
|
|
ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
|
|
ItemsOrganiser="{TemplateBinding HeaderItemsOrganiser}"
|
|
KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"
|
|
ItemTemplate="{TemplateBinding HeaderItemTemplate}"
|
|
Style="{StaticResource TabablzDragablzItemsControlStyle}">
|
|
<dragablz:DragablzItemsControl.MaxWidth>
|
|
<MultiBinding>
|
|
<MultiBinding.Converter>
|
|
<dragablz:TabablzHeaderSizeConverter Orientation="Horizontal"/>
|
|
</MultiBinding.Converter>
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualWidth" />
|
|
<Binding RelativeSource="{RelativeSource Self}" Path="ItemsPresenterWidth" />
|
|
<Binding ElementName="PrefixContentControl" Path="ActualWidth" />
|
|
<Binding ElementName="DefaultAddButton" Path="DesiredSize.Width" />
|
|
<Binding ElementName="SuffixContentControl" Path="DesiredSize.Width" />
|
|
</MultiBinding>
|
|
</dragablz:DragablzItemsControl.MaxWidth>
|
|
</dragablz:DragablzItemsControl>
|
|
<Button Style="{StaticResource MaterialDesignAddItemCommandButtonStyle}"
|
|
x:Name="DefaultAddButton"
|
|
Grid.Column="2"
|
|
Command="{x:Static dragablz:TabablzControl.AddItemCommand}"
|
|
Visibility="{TemplateBinding ShowDefaultAddButton, Converter={StaticResource BooleanToVisibilityConverter}}"
|
|
/>
|
|
<ContentControl Grid.Column="3" x:Name="SuffixContentControl"
|
|
Content="{TemplateBinding HeaderSuffixContent}"
|
|
ContentStringFormat="{TemplateBinding HeaderSuffixContentStringFormat}"
|
|
ContentTemplate="{TemplateBinding HeaderSuffixContentStringFormat}"
|
|
ContentTemplateSelector="{TemplateBinding HeaderSuffixContentTemplateSelector}"
|
|
HorizontalAlignment="Stretch"
|
|
/>
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="TabStripPlacement" Value="Bottom">
|
|
<Setter Property="Grid.Row" TargetName="PART_HeaderItemsControl" Value="1"/>
|
|
<Setter Property="Grid.Row" TargetName="contentPanel" Value="0"/>
|
|
<Setter Property="Height" TargetName="RowDefinition0" Value="*"/>
|
|
<Setter Property="Height" TargetName="RowDefinition1" Value="Auto"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDraggingWindow" Value="True">
|
|
<Setter TargetName="DefaultAddButton" Property="Visibility" Value="Hidden" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.Triggers>
|
|
<Trigger Property="TabStripPlacement" Value="Left">
|
|
<Setter Property="HeaderItemsOrganiser">
|
|
<Setter.Value>
|
|
<dragablz:VerticalOrganiser />
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource MaterialDesignDragableTabItemVerticalStyle}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type dragablz:TabablzControl}">
|
|
<Grid x:Name="templateRoot" ClipToBounds="true" SnapsToDevicePixels="true" KeyboardNavigation.TabNavigation="Local">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="ColumnDefinition0" Width="Auto"/>
|
|
<ColumnDefinition x:Name="ColumnDefinition1" Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Border x:Name="contentPanel" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" KeyboardNavigation.DirectionalNavigation="Contained" KeyboardNavigation.TabIndex="2" KeyboardNavigation.TabNavigation="Local" Margin="-1 0 0 0">
|
|
<Grid x:Name="PART_ItemsHolder" />
|
|
</Border>
|
|
<Grid Grid.Column="0" x:Name="HeaderContainerGrid" Visibility="{TemplateBinding IsHeaderPanelVisible, Converter={StaticResource BooleanToVisibilityConverter}}">
|
|
<Grid.Resources>
|
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource StandardEmbeddedButtonStyle}" />
|
|
</Grid.Resources>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Border Background="{TemplateBinding BorderBrush}" Grid.RowSpan="4">
|
|
<Border.Effect>
|
|
<DropShadowEffect BlurRadius="5" ShadowDepth="2" Direction="0" Opacity=".5" />
|
|
</Border.Effect>
|
|
</Border>
|
|
<ContentControl Grid.Row="0" x:Name="PrefixContentControl"
|
|
Content="{TemplateBinding HeaderPrefixContent}"
|
|
ContentStringFormat="{TemplateBinding HeaderPrefixContentStringFormat}"
|
|
ContentTemplate="{TemplateBinding HeaderPrefixContentStringFormat}"
|
|
ContentTemplateSelector="{TemplateBinding HeaderPrefixContentTemplateSelector}"/>
|
|
<dragablz:DragablzItemsControl x:Name="PART_HeaderItemsControl"
|
|
Grid.Row="1"
|
|
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Items}"
|
|
ItemContainerStyle="{TemplateBinding ItemContainerStyle}"
|
|
FixedItemCount="{TemplateBinding FixedHeaderCount}"
|
|
ItemsOrganiser="{TemplateBinding HeaderItemsOrganiser}"
|
|
KeyboardNavigation.TabIndex="1" Panel.ZIndex="1"
|
|
ItemTemplate="{TemplateBinding HeaderItemTemplate}"
|
|
Style="{StaticResource TabablzDragablzItemsControlStyle}">
|
|
<dragablz:DragablzItemsControl.MaxHeight>
|
|
<MultiBinding>
|
|
<MultiBinding.Converter>
|
|
<dragablz:TabablzHeaderSizeConverter Orientation="Vertical"/>
|
|
</MultiBinding.Converter>
|
|
<Binding RelativeSource="{RelativeSource TemplatedParent}" Path="ActualHeight" />
|
|
<Binding RelativeSource="{RelativeSource Self}" Path="ItemsPresenterHeight" />
|
|
<Binding ElementName="PrefixContentControl" Path="ActualHeight" />
|
|
<Binding ElementName="DefaultAddButton" Path="DesiredSize.Height" />
|
|
<Binding ElementName="SuffixContentControl" Path="DesiredSize.Height" />
|
|
</MultiBinding>
|
|
</dragablz:DragablzItemsControl.MaxHeight>
|
|
</dragablz:DragablzItemsControl>
|
|
<Button Style="{StaticResource MaterialDesignAddItemCommandButtonStyle}"
|
|
x:Name="DefaultAddButton"
|
|
Grid.Row="2"
|
|
Command="{x:Static dragablz:TabablzControl.AddItemCommand}"
|
|
Visibility="{TemplateBinding ShowDefaultAddButton, Converter={StaticResource BooleanToVisibilityConverter}}" />
|
|
<ContentControl Grid.Row="3" x:Name="SuffixContentControl"
|
|
Content="{TemplateBinding HeaderSuffixContent}"
|
|
ContentStringFormat="{TemplateBinding HeaderSuffixContentStringFormat}"
|
|
ContentTemplate="{TemplateBinding HeaderSuffixContentStringFormat}"
|
|
ContentTemplateSelector="{TemplateBinding HeaderSuffixContentTemplateSelector}"
|
|
VerticalAlignment="Top" />
|
|
</Grid>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="TextElement.Foreground" TargetName="templateRoot" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsDraggingWindow" Value="True">
|
|
<Setter TargetName="DefaultAddButton" Property="Visibility" Value="Hidden" />
|
|
</Trigger>
|
|
<Trigger Property="TabStripPlacement" Value="Right">
|
|
<!-- TODO -->
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="MaterialDesignAlternateDragableTabItemStyle" TargetType="{x:Type dragablz:DragablzItem}" BasedOn="{StaticResource MaterialDesignDragableTabItemStyle}">
|
|
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignColumnHeader}"/>
|
|
<Setter Property="local:MaterialDesignAssist.IndicatorBrush" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="False" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" />
|
|
</MultiTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="MaterialDesignAlternateDragableTabItemVerticalStyle" TargetType="{x:Type dragablz:DragablzItem}" BasedOn="{StaticResource MaterialDesignDragableTabItemVerticalStyle}">
|
|
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignColumnHeader}"/>
|
|
<Setter Property="local:MaterialDesignAssist.IndicatorBrush" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="False" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="Foreground" Value="{DynamicResource MaterialDesignBody}" />
|
|
</MultiTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="{x:Type dragablz:TabablzControl}" x:Key="MaterialDesignAlternateTabablzControlStyle" BasedOn="{StaticResource MaterialDesignTabablzControlStyle}">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignPaper}" />
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource MaterialDesignAlternateDragableTabItemStyle}" />
|
|
<Style.Triggers>
|
|
<Trigger Property="TabStripPlacement" Value="Left">
|
|
<Setter Property="ItemContainerStyle" Value="{StaticResource MaterialDesignAlternateDragableTabItemVerticalStyle}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
</ResourceDictionary>
|