mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
3537 lines
No EOL
236 KiB
XML
3537 lines
No EOL
236 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:Flow.Launcher.Converters"
|
|
xmlns:helper="clr-namespace:Flow.Launcher.Helper"
|
|
xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf"
|
|
xmlns:mdagif="clr-namespace:MdXaml.AnimatedGif;assembly=MdXaml.AnimatedGif"
|
|
xmlns:mdhtml="clr-namespace:MdXaml.Html;assembly=MdXaml.Html"
|
|
xmlns:mdplugins="clr-namespace:MdXaml.Plugins;assembly=MdXaml.Plugins"
|
|
xmlns:mdsvg="clr-namespace:MdXaml.Svg;assembly=MdXaml.Svg"
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern">
|
|
|
|
<!-- Setting Window Font -->
|
|
<FontFamily x:Key="SettingWindowFont">Segoe UI</FontFamily>
|
|
<Style TargetType="ui:FontIcon">
|
|
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
|
|
</Style>
|
|
<Style TargetType="Control">
|
|
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
|
|
</Style>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
|
|
</Style>
|
|
<Style TargetType="Window">
|
|
<Setter Property="FontFamily" Value="{DynamicResource SettingWindowFont}" />
|
|
</Style>
|
|
<FontFamily x:Key="ContentControlThemeFontFamily">
|
|
{DynamicResource SettingWindowFont}
|
|
</FontFamily>
|
|
|
|
<!-- Context Menu for TextBox -->
|
|
<ContextMenu x:Key="TextBoxContextMenu">
|
|
<MenuItem Command="ApplicationCommands.Cut" Header="{DynamicResource cut}">
|
|
<MenuItem.Icon>
|
|
<ui:FontIcon Glyph="" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="ApplicationCommands.Copy" Header="{DynamicResource copy}">
|
|
<MenuItem.Icon>
|
|
<ui:FontIcon Glyph="" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="ApplicationCommands.Paste" Header="{DynamicResource paste}">
|
|
<MenuItem.Icon>
|
|
<ui:FontIcon Glyph="" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="ApplicationCommands.Undo" Header="{DynamicResource undo}">
|
|
<MenuItem.Icon>
|
|
<ui:FontIcon Glyph="" />
|
|
</MenuItem.Icon>
|
|
</MenuItem>
|
|
<MenuItem Command="ApplicationCommands.SelectAll" Header="{DynamicResource selectAll}" />
|
|
</ContextMenu>
|
|
|
|
<!-- Content Control for foreground -->
|
|
<Style TargetType="{x:Type ContentControl}">
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
</Style>
|
|
|
|
<!-- Setting Window -->
|
|
<Style x:Key="PageTitle" TargetType="{x:Type TextBlock}">
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
</Style>
|
|
<Style x:Key="Glyph" TargetType="{x:Type TextBlock}">
|
|
<Setter Property="Grid.Column" Value="0" />
|
|
<Setter Property="Margin" Value="24 0 16 0" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="FontSize" Value="20" />
|
|
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
</Style>
|
|
<Style x:Key="TabMenu" TargetType="{x:Type TextBlock}">
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
</Style>
|
|
<Style x:Key="TabMenuIcon" TargetType="{x:Type TextBlock}">
|
|
<Setter Property="Margin" Value="0 0 12 0" />
|
|
<Setter Property="FontSize" Value="16" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
</Style>
|
|
<Style x:Key="SettingSeparatorStyle" TargetType="{x:Type Separator}">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Color03B}" />
|
|
</Style>
|
|
|
|
<!-- Title Bar -->
|
|
<Style x:Key="WindowMainPanelStyle" TargetType="{x:Type Border}">
|
|
<Setter Property="BorderBrush" Value="{DynamicResource WindowBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=WindowState}" Value="Maximized">
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Padding" Value="6" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style x:Key="TitleBarButtonStyle" TargetType="Button">
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border
|
|
x:Name="border"
|
|
Background="{DynamicResource Color01B}"
|
|
BorderThickness="0"
|
|
SnapsToDevicePixels="true">
|
|
<ContentPresenter
|
|
x:Name="contentPresenter"
|
|
Margin="0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Focusable="False"
|
|
RecognizesAccessKey="True" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource Color06B}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource Color09B}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="TitleBarCloseButtonStyle" TargetType="Button">
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="WindowChrome.IsHitTestVisibleInChrome" Value="True" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border
|
|
x:Name="border"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
SnapsToDevicePixels="true">
|
|
<ContentPresenter
|
|
x:Name="contentPresenter"
|
|
Margin="0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Focusable="False"
|
|
RecognizesAccessKey="True" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource Color10B}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MouseOverWindowCloseButtonForegroundBrush}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="border" Property="Background" Value="{DynamicResource Color11B}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MouseOverWindowCloseButtonForegroundBrush}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Custom Context Menu from UI.WPF.Modern to remove tab focus & focus visual -->
|
|
<Style x:Key="ContextMenuStyleBase" TargetType="ContextMenu">
|
|
<Setter Property="Background" Value="{DynamicResource MenuFlyoutPresenterBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutPresenterBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}" />
|
|
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutPresenterThemePadding}" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="FontStyle" Value="Normal" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
|
|
<Setter Property="KeyboardNavigation.IsTabStop" Value="False" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="Grid.IsSharedSizeScope" Value="true" />
|
|
<Setter Property="HasDropShadow" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
<Setter Property="MaxWidth" Value="{DynamicResource FlyoutThemeMaxWidth}" />
|
|
<Setter Property="MinHeight" Value="{DynamicResource MenuFlyoutThemeMinHeight}" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource OverlayCornerRadius}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ContextMenu">
|
|
<ui:ThemeShadowChrome
|
|
x:Name="Shdw"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
IsShadowEnabled="{TemplateBinding HasDropShadow}"
|
|
SnapsToDevicePixels="True">
|
|
<Border
|
|
MinHeight="{DynamicResource MenuFlyoutThemeMinHeight}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
|
<ui:ScrollViewerEx
|
|
x:Name="ContextMenuScrollViewer"
|
|
MinWidth="{DynamicResource FlyoutThemeMinWidth}"
|
|
Margin="{TemplateBinding Padding}"
|
|
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
|
|
TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
|
<ItemsPresenter
|
|
KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
KeyboardNavigation.TabNavigation="None"
|
|
RenderOptions.ClearTypeHint="Enabled"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ui:ScrollViewerEx>
|
|
</Border>
|
|
</ui:ThemeShadowChrome>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="DefaultContextMenuStyle"
|
|
BasedOn="{StaticResource ContextMenuStyleBase}"
|
|
TargetType="ContextMenu">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultContextMenuStyle}" TargetType="ContextMenu" />
|
|
|
|
<Style x:Key="DefaultMenuItemStyle" TargetType="MenuItem">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource MenuFlyoutItemBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutItemBackgroundBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutItemBorderThickness}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemForeground}" />
|
|
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutItemThemePadding}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuItemTemplateKey}}" />
|
|
<Style.Triggers>
|
|
<Trigger Property="Role" Value="TopLevelHeader">
|
|
<Setter Property="Background" Value="{DynamicResource MenuBarItemBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource MenuBarItemBorderThickness}" />
|
|
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelHeaderTemplateKey}}" />
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Header" Value="Item" />
|
|
<Setter Property="Height" Value="{DynamicResource MenuBarHeight}" />
|
|
</Trigger>
|
|
<Trigger Property="Role" Value="TopLevelItem">
|
|
<Setter Property="Background" Value="{DynamicResource MenuBarItemBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource MenuBarItemBorderThickness}" />
|
|
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelItemTemplateKey}}" />
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Header" Value="Item" />
|
|
<Setter Property="Height" Value="{DynamicResource MenuBarHeight}" />
|
|
</Trigger>
|
|
<Trigger Property="Role" Value="SubmenuHeader">
|
|
<Setter Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MenuFlyoutSubItemBackgroundBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource MenuFlyoutSubItemBorderThickness}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemForeground}" />
|
|
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuHeaderTemplateKey}}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultMenuItemStyle}" TargetType="MenuItem" />
|
|
|
|
<!-- List View from UI.WPF.Modern to adjust GridView item margin -->
|
|
<Style
|
|
x:Key="{x:Static GridView.GridViewItemContainerStyleKey}"
|
|
BasedOn="{StaticResource DefaultListViewItemStyle}"
|
|
TargetType="ListViewItem">
|
|
<Setter Property="Padding" Value="6 0" />
|
|
<Setter Property="Margin" Value="0 2" />
|
|
<Setter Property="Background" Value="{DynamicResource GridViewItemBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource GridViewItemForeground}" />
|
|
<Setter Property="MinWidth" Value="{DynamicResource GridViewItemMinWidth}" />
|
|
<Setter Property="MinHeight" Value="{DynamicResource GridViewItemMinHeight}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListViewItem">
|
|
<Border
|
|
x:Name="LayoutRoot"
|
|
Margin="{TemplateBinding Margin}"
|
|
ui:PressHelper.IsEnabled="True"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
SnapsToDevicePixels="true">
|
|
<Grid>
|
|
<Rectangle
|
|
x:Name="PressedBackground"
|
|
Width="3.5"
|
|
Margin="0 10"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch"
|
|
Fill="{DynamicResource GridViewItemSelectedBorderBrush}"
|
|
Opacity="0"
|
|
RadiusX="{Binding Value, Source={StaticResource ListViewItemSelectionIndicatorCornerRadiusProxy}, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
|
|
RadiusY="{Binding Value, Source={StaticResource ListViewItemSelectionIndicatorCornerRadiusProxy}, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<Rectangle.RenderTransform>
|
|
<ScaleTransform x:Name="PillTransform" ScaleY="1" />
|
|
</Rectangle.RenderTransform>
|
|
</Rectangle>
|
|
<GridViewRowPresenter
|
|
x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PillTransform" Storyboard.TargetProperty="ScaleY">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="1,0,0,0"
|
|
KeyTime="{DynamicResource ListViewItemScaleAnimationDuration}"
|
|
Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PillTransform" Storyboard.TargetProperty="ScaleY">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0,0,0,1"
|
|
KeyTime="{DynamicResource ListViewItemScaleAnimationDuration}"
|
|
Value="{DynamicResource ListViewItemPillMinScale}" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="SelectionStates">
|
|
<VisualState x:Name="Selected">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="PillTransform" Storyboard.TargetProperty="ScaleY">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="{DynamicResource ListViewItemPillMinScale}" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0,0,0,1"
|
|
KeyTime="{DynamicResource ListViewItemScaleAnimationDuration}"
|
|
Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Unselected" />
|
|
<VisualState x:Name="SelectedInactive" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="LayoutRoot" Property="Opacity" Value="{DynamicResource ListViewItemDisabledThemeOpacity}" />
|
|
</Trigger>
|
|
<Trigger SourceName="LayoutRoot" Property="ui:PressHelper.IsPressed" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="ui:ControlHelper.VisualState" Value="Pressed" />
|
|
</Trigger>
|
|
<Trigger SourceName="LayoutRoot" Property="ui:PressHelper.IsPressed" Value="False">
|
|
<Setter TargetName="LayoutRoot" Property="ui:ControlHelper.VisualState" Value="Normal" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource GridViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource GridViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelected" Value="True">
|
|
<Setter TargetName="PressedBackground" Property="Opacity" Value="1" />
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource GridViewItemBackgroundSelected}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource GridViewItemForegroundSelected}" />
|
|
</Trigger>
|
|
<Trigger SourceName="LayoutRoot" Property="ui:PressHelper.IsPressed" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource GridViewItemBackgroundPressed}" />
|
|
</Trigger>
|
|
<!-- SelectedPointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource GridViewItemBackgroundSelectedPointerOver}" />
|
|
<Setter TargetName="PressedBackground" Property="Fill" Value="{DynamicResource GridViewItemSelectedPointerOverBorderBrush}" />
|
|
</MultiTrigger>
|
|
<!-- SelectedPressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True" />
|
|
<Condition SourceName="LayoutRoot" Property="ui:PressHelper.IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource GridViewItemBackgroundSelectedPressed}" />
|
|
<Setter TargetName="PressedBackground" Property="Fill" Value="{DynamicResource GridViewItemSelectedPressedBorderBrush}" />
|
|
</MultiTrigger>
|
|
<!-- SelectedDisabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource GridViewItemBackgroundSelectedDisabled}" />
|
|
<Setter TargetName="PressedBackground" Property="Fill" Value="{DynamicResource GridViewItemSelectedDisabledBorderBrush}" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Toggle Button from UI.WPF.Modern to change Padding & Background -->
|
|
<Style
|
|
x:Key="CustomToggleButtonStyle"
|
|
BasedOn="{StaticResource DefaultToggleButtonStyle}"
|
|
TargetType="ToggleButton">
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundColor}" />
|
|
<Setter Property="Padding" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<ui:ElevationBorder
|
|
x:Name="Background"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
SnapsToDevicePixels="True">
|
|
<ui:ElevationBorder
|
|
x:Name="Border"
|
|
Padding="{TemplateBinding Padding}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
|
<ui:ContentPresenterEx
|
|
x:Name="ContentPresenter"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Focusable="False"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ui:ElevationBorder>
|
|
</ui:ElevationBorder>
|
|
<ControlTemplate.Triggers>
|
|
<!-- PointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="False" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<!-- Background changed from ToggleButtonBackgroundPointerOver to ButtonMouseOver -->
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonMouseOver}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushPointerOver}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundPointerOver}" />
|
|
</MultiTrigger>
|
|
<!-- Pressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="False" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<!-- Background changed from ToggleButtonBackgroundPressed to ButtonMousePressed -->
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushPressed}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundPressed}" />
|
|
</MultiTrigger>
|
|
<!-- Disabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="False" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundDisabled}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundDisabled}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushDisabled}" />
|
|
</MultiTrigger>
|
|
<!-- Checked -->
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="Background" Property="BorderThickness" Value="0" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushChecked}" />
|
|
<Setter TargetName="Border" Property="BorderThickness" Value="{Binding BorderThickness, RelativeSource={RelativeSource TemplatedParent}}" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="True" />
|
|
<Condition Property="IsMouseOver" Value="False" />
|
|
<Condition Property="IsPressed" Value="False" />
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundChecked}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundChecked}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushChecked}" />
|
|
</MultiTrigger>
|
|
<!-- CheckedPointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="True" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundCheckedPointerOver}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushCheckedPointerOver}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundCheckedPointerOver}" />
|
|
</MultiTrigger>
|
|
<!-- CheckedPressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="True" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundCheckedPressed}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundCheckedPressed}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushCheckedPressed}" />
|
|
</MultiTrigger>
|
|
<!-- CheckedDisabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="True" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundCheckedDisabled}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundCheckedDisabled}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushCheckedDisabled}" />
|
|
</MultiTrigger>
|
|
<!-- Indeterminate -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="{x:Null}" />
|
|
<Condition Property="IsMouseOver" Value="False" />
|
|
<Condition Property="IsPressed" Value="False" />
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundIndeterminate}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundIndeterminate}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushIndeterminate}" />
|
|
</MultiTrigger>
|
|
<!-- IndeterminatePointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="{x:Null}" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundIndeterminatePointerOver}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushIndeterminatePointerOver}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundIndeterminatePointerOver}" />
|
|
</MultiTrigger>
|
|
<!-- IndeterminatePressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="{x:Null}" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundIndeterminatePressed}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushIndeterminatePressed}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundIndeterminatePressed}" />
|
|
</MultiTrigger>
|
|
<!-- IndeterminateDisabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="{x:Null}" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ToggleButtonBackgroundIndeterminateDisabled}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleButtonForegroundIndeterminateDisabled}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ToggleButtonBorderBrushIndeterminateDisabled}" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Custom Toggle Switch from UI.WPF.Modern for left label -->
|
|
<Thickness x:Key="ToggleSwitchTopHeaderMargin">0,0,0,4</Thickness>
|
|
<system:Double x:Key="ToggleSwitchPreContentMargin">10</system:Double>
|
|
<system:Double x:Key="ToggleSwitchPostContentMargin">10</system:Double>
|
|
|
|
<system:Double x:Key="ToggleSwitchLabelGap">12</system:Double>
|
|
<GridLength x:Key="ToggleSwitchLabelGapGL">12</GridLength>
|
|
|
|
<system:Double x:Key="ToggleSwitchThemeMinWidth">154</system:Double>
|
|
|
|
<system:TimeSpan x:Key="RepositionDelay">0:0:0.033</system:TimeSpan>
|
|
<KeyTime x:Key="RepositionDuration">0:0:0.367</KeyTime>
|
|
<KeySpline x:Key="RepositionKeySpline">0.1,0.9 0.2,1.0</KeySpline>
|
|
|
|
<Style x:Key="DefaultToggleSwitch" TargetType="ui:ToggleSwitch">
|
|
<Setter Property="Foreground" Value="{DynamicResource ToggleSwitchContentForeground}" />
|
|
<!-- Change HorizontalAlignment from Left to Center -->
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<!-- Change HorizontalContentAlignment from Left to Center -->
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
|
|
<Setter Property="MinWidth" Value="{DynamicResource ToggleSwitchThemeMinWidth}" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="-7,-3,-7,-3" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:ToggleSwitch">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
|
SnapsToDevicePixels="True">
|
|
<Border.Resources>
|
|
<Storyboard x:Key="DraggingToOnTransition">
|
|
<DoubleAnimationUsingKeyFrames
|
|
BeginTime="{StaticResource RepositionDelay}"
|
|
Storyboard.TargetName="KnobTranslateTransform"
|
|
Storyboard.TargetProperty="X">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{StaticResource RepositionKeySpline}"
|
|
KeyTime="{StaticResource RepositionDuration}"
|
|
Value="20" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
|
|
<Storyboard x:Key="OnToDraggingTransition">
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
|
|
<Storyboard x:Key="DraggingToOffTransition">
|
|
<DoubleAnimationUsingKeyFrames
|
|
BeginTime="{StaticResource RepositionDelay}"
|
|
Storyboard.TargetName="KnobTranslateTransform"
|
|
Storyboard.TargetProperty="X">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{StaticResource RepositionKeySpline}"
|
|
KeyTime="{StaticResource RepositionDuration}"
|
|
Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</Border.Resources>
|
|
<VisualStateManager.CustomVisualStateManager>
|
|
<ui:SimpleVisualStateManager />
|
|
</VisualStateManager.CustomVisualStateManager>
|
|
|
|
<!-- Set HorizontalAlignment to Right -->
|
|
<Grid HorizontalAlignment="Right">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ui:ContentPresenterEx
|
|
x:Name="HeaderContentPresenter"
|
|
Grid.Row="0"
|
|
Margin="{StaticResource ToggleSwitchTopHeaderMargin}"
|
|
VerticalAlignment="Top"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
Foreground="{DynamicResource ToggleSwitchHeaderForeground}"
|
|
IsHitTestVisible="False"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextWrapping="Wrap"
|
|
Visibility="Collapsed" />
|
|
<!-- Set HorizontalAlignment to Right -->
|
|
<Grid
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition ui:RowDefinitionHelper.PixelHeight="{DynamicResource ToggleSwitchPreContentMargin}" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition ui:RowDefinitionHelper.PixelHeight="{DynamicResource ToggleSwitchPostContentMargin}" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition
|
|
x:Name="ColumnDefinition_LeftGap"
|
|
Width="0"
|
|
MaxWidth="{StaticResource ToggleSwitchLabelGap}" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition
|
|
x:Name="ColumnDefinition_RightGap"
|
|
Width="{StaticResource ToggleSwitchLabelGapGL}"
|
|
MaxWidth="{StaticResource ToggleSwitchLabelGap}" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<!-- Set HorizontalAlignment to Right -->
|
|
<Border
|
|
x:Name="SwitchAreaGrid"
|
|
Grid.RowSpan="3"
|
|
Grid.ColumnSpan="5"
|
|
Margin="0 5"
|
|
HorizontalAlignment="Right"
|
|
ui:FocusVisualHelper.IsTemplateFocusTarget="True"
|
|
Background="{DynamicResource ToggleSwitchContainerBackground}"
|
|
CornerRadius="{TemplateBinding CornerRadius}" />
|
|
<ui:ContentPresenterEx
|
|
x:Name="OffContentPresenter"
|
|
Grid.RowSpan="3"
|
|
Grid.Column="4"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding OffContent}"
|
|
ContentTemplate="{TemplateBinding OffContentTemplate}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
IsHitTestVisible="False"
|
|
Opacity="0"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
<ui:ContentPresenterEx
|
|
x:Name="OnContentPresenter"
|
|
Grid.RowSpan="3"
|
|
Grid.Column="4"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding OnContent}"
|
|
ContentTemplate="{TemplateBinding OnContentTemplate}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
IsHitTestVisible="False"
|
|
Opacity="0"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
<!-- Set HorizontalAlignment to Right -->
|
|
<Rectangle
|
|
x:Name="OuterBorder"
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Width="40"
|
|
Height="20"
|
|
HorizontalAlignment="Right"
|
|
Fill="{DynamicResource ToggleSwitchFillOff}"
|
|
RadiusX="10"
|
|
RadiusY="10"
|
|
Stroke="{DynamicResource ToggleSwitchStrokeOff}"
|
|
StrokeThickness="{DynamicResource ToggleSwitchOuterBorderStrokeThickness}" />
|
|
<!-- Set HorizontalAlignment to Right -->
|
|
<Rectangle
|
|
x:Name="SwitchKnobBounds"
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Width="40"
|
|
Height="20"
|
|
HorizontalAlignment="Right"
|
|
Fill="{DynamicResource ToggleSwitchFillOn}"
|
|
Opacity="0"
|
|
RadiusX="10"
|
|
RadiusY="10"
|
|
Stroke="{DynamicResource ToggleSwitchStrokeOn}"
|
|
StrokeThickness="{DynamicResource ToggleSwitchOnStrokeThickness}" />
|
|
<Grid
|
|
x:Name="SwitchKnob"
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Width="20"
|
|
Height="20"
|
|
HorizontalAlignment="Left">
|
|
<Border
|
|
x:Name="SwitchKnobOn"
|
|
Width="12"
|
|
Height="12"
|
|
Margin="0 0 1 0"
|
|
HorizontalAlignment="Center"
|
|
Background="{DynamicResource ToggleSwitchKnobFillOn}"
|
|
CornerRadius="7"
|
|
Opacity="0"
|
|
RenderTransformOrigin="0.5, 0.5">
|
|
<Border
|
|
x:Name="SwitchKnobOnBorder"
|
|
BorderBrush="{DynamicResource ToggleSwitchKnobStrokeOn}"
|
|
CornerRadius="7" />
|
|
</Border>
|
|
<Rectangle
|
|
x:Name="SwitchKnobOff"
|
|
Width="12"
|
|
Height="12"
|
|
Margin="-1 0 0 0"
|
|
HorizontalAlignment="Center"
|
|
Fill="{DynamicResource ToggleSwitchKnobFillOff}"
|
|
RadiusX="7"
|
|
RadiusY="7"
|
|
RenderTransformOrigin="0.5, 0.5" />
|
|
<Grid.RenderTransform>
|
|
<TranslateTransform x:Name="KnobTranslateTransform" />
|
|
</Grid.RenderTransform>
|
|
</Grid>
|
|
<Thumb
|
|
x:Name="SwitchThumb"
|
|
Grid.RowSpan="3"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="5">
|
|
<Thumb.Template>
|
|
<ControlTemplate TargetType="Thumb">
|
|
<Rectangle Fill="Transparent" />
|
|
</ControlTemplate>
|
|
</Thumb.Template>
|
|
</Thumb>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="MouseOver">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="14" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="14" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="14" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="14" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="17" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="14" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="17" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlFasterAnimationDuration}"
|
|
Value="14" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlNormalAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlNormalAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Width">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlNormalAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Height">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{DynamicResource ControlFastOutSlowInKeySpline}"
|
|
KeyTime="{DynamicResource ControlNormalAnimationDuration}"
|
|
Value="12" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ToggleStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition
|
|
x:Name="DraggingOffToOnTransition"
|
|
GeneratedDuration="0"
|
|
Storyboard="{StaticResource DraggingToOnTransition}"
|
|
From="DraggingOff"
|
|
To="On" />
|
|
<VisualTransition
|
|
x:Name="DraggingOnToOnTransition"
|
|
GeneratedDuration="0"
|
|
Storyboard="{StaticResource DraggingToOnTransition}"
|
|
From="DraggingOn"
|
|
To="On" />
|
|
<VisualTransition
|
|
x:Name="OnToDraggingOnTransition"
|
|
GeneratedDuration="0"
|
|
Storyboard="{StaticResource OnToDraggingTransition}"
|
|
From="On"
|
|
To="DraggingOn" />
|
|
<VisualTransition
|
|
x:Name="OnToDraggingOffTransition"
|
|
GeneratedDuration="0"
|
|
Storyboard="{StaticResource OnToDraggingTransition}"
|
|
From="On"
|
|
To="DraggingOff" />
|
|
<VisualTransition
|
|
x:Name="DraggingOffToOffTransition"
|
|
GeneratedDuration="0"
|
|
Storyboard="{StaticResource DraggingToOffTransition}"
|
|
From="DraggingOff"
|
|
To="Off" />
|
|
<VisualTransition
|
|
x:Name="DraggingOnToOffTransition"
|
|
GeneratedDuration="0"
|
|
Storyboard="{StaticResource DraggingToOffTransition}"
|
|
From="DraggingOn"
|
|
To="Off" />
|
|
<VisualTransition
|
|
x:Name="OnToOffTransition"
|
|
GeneratedDuration="0"
|
|
From="On"
|
|
To="Off">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames
|
|
BeginTime="{StaticResource RepositionDelay}"
|
|
Storyboard.TargetName="KnobTranslateTransform"
|
|
Storyboard.TargetProperty="X">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{StaticResource RepositionKeySpline}"
|
|
KeyTime="{StaticResource RepositionDuration}"
|
|
Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<VisualTransition
|
|
x:Name="OffToOnTransition"
|
|
GeneratedDuration="0"
|
|
From="Off"
|
|
To="On">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames
|
|
BeginTime="{StaticResource RepositionDelay}"
|
|
Storyboard.TargetName="KnobTranslateTransform"
|
|
Storyboard.TargetProperty="X">
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="{StaticResource RepositionKeySpline}"
|
|
KeyTime="{StaticResource RepositionDuration}"
|
|
Value="20" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="DraggingOff" />
|
|
<VisualState x:Name="DraggingOn">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Off">
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="KnobTranslateTransform"
|
|
Storyboard.TargetProperty="X"
|
|
To="0"
|
|
Duration="0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="On">
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="KnobTranslateTransform"
|
|
Storyboard.TargetProperty="X"
|
|
To="20"
|
|
Duration="0" />
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobBounds" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="{DynamicResource ControlFasterAnimationDuration}" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ContentStates">
|
|
<VisualState x:Name="OffContent">
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="OffContentPresenter"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="1"
|
|
Duration="0" />
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="OffContentPresenter" Storyboard.TargetProperty="IsHitTestVisible">
|
|
<DiscreteBooleanKeyFrame KeyTime="0" Value="True" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="OnContent">
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="OnContentPresenter"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="1"
|
|
Duration="0" />
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="OnContentPresenter" Storyboard.TargetProperty="IsHitTestVisible">
|
|
<DiscreteBooleanKeyFrame KeyTime="0" Value="True" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<!-- PointerOver -->
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="OuterBorder" Property="Stroke" Value="{DynamicResource ToggleSwitchStrokeOffPointerOver}" />
|
|
<Setter TargetName="OuterBorder" Property="Fill" Value="{DynamicResource ToggleSwitchFillOffPointerOver}" />
|
|
<Setter TargetName="SwitchKnobOff" Property="Fill" Value="{DynamicResource ToggleSwitchKnobFillOffPointerOver}" />
|
|
<Setter TargetName="SwitchKnobOn" Property="Background" Value="{DynamicResource ToggleSwitchKnobFillOnPointerOver}" />
|
|
<Setter TargetName="SwitchKnobBounds" Property="Fill" Value="{DynamicResource ToggleSwitchFillOnPointerOver}" />
|
|
<Setter TargetName="SwitchKnobBounds" Property="Stroke" Value="{DynamicResource ToggleSwitchStrokeOnPointerOver}" />
|
|
<Setter TargetName="SwitchAreaGrid" Property="Background" Value="{DynamicResource ToggleSwitchContainerBackgroundPointerOver}" />
|
|
</Trigger>
|
|
<!-- Pressed -->
|
|
<Trigger SourceName="SwitchThumb" Property="IsDragging" Value="true">
|
|
<Setter TargetName="SwitchKnobOn" Property="HorizontalAlignment" Value="Right" />
|
|
<Setter TargetName="SwitchKnobOn" Property="Margin" Value="0 0 3 0" />
|
|
<Setter TargetName="SwitchKnobOff" Property="HorizontalAlignment" Value="Left" />
|
|
<Setter TargetName="SwitchKnobOff" Property="Margin" Value="3 0 0 0" />
|
|
<Setter TargetName="OuterBorder" Property="Stroke" Value="{DynamicResource ToggleSwitchStrokeOffPressed}" />
|
|
<Setter TargetName="OuterBorder" Property="Fill" Value="{DynamicResource ToggleSwitchFillOffPressed}" />
|
|
<Setter TargetName="SwitchKnobOff" Property="Fill" Value="{DynamicResource ToggleSwitchKnobFillOffPressed}" />
|
|
<Setter TargetName="SwitchKnobOn" Property="Background" Value="{DynamicResource ToggleSwitchKnobFillOnPressed}" />
|
|
<Setter TargetName="SwitchKnobBounds" Property="Fill" Value="{DynamicResource ToggleSwitchFillOnPressed}" />
|
|
<Setter TargetName="SwitchKnobBounds" Property="Stroke" Value="{DynamicResource ToggleSwitchStrokeOnPressed}" />
|
|
<Setter TargetName="SwitchAreaGrid" Property="Background" Value="{DynamicResource ToggleSwitchContainerBackgroundPressed}" />
|
|
</Trigger>
|
|
<!-- Disabled -->
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource ToggleSwitchHeaderForegroundDisabled}" />
|
|
<Setter TargetName="OffContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ToggleSwitchContentForegroundDisabled}" />
|
|
<Setter TargetName="OnContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ToggleSwitchContentForegroundDisabled}" />
|
|
<Setter TargetName="OuterBorder" Property="Stroke" Value="{DynamicResource ToggleSwitchStrokeOffDisabled}" />
|
|
<Setter TargetName="OuterBorder" Property="Fill" Value="{DynamicResource ToggleSwitchFillOffDisabled}" />
|
|
<Setter TargetName="SwitchKnobOff" Property="Fill" Value="{DynamicResource ToggleSwitchKnobFillOffDisabled}" />
|
|
<Setter TargetName="SwitchKnobOn" Property="Background" Value="{DynamicResource ToggleSwitchKnobFillOnDisabled}" />
|
|
<Setter TargetName="SwitchKnobBounds" Property="Fill" Value="{DynamicResource ToggleSwitchFillOnDisabled}" />
|
|
<Setter TargetName="SwitchKnobBounds" Property="Stroke" Value="{DynamicResource ToggleSwitchStrokeOnDisabled}" />
|
|
<Setter TargetName="SwitchAreaGrid" Property="Background" Value="{DynamicResource ToggleSwitchContainerBackgroundDisabled}" />
|
|
</Trigger>
|
|
<Trigger Property="IsRightAlignedCompact" Value="True">
|
|
<Setter TargetName="OffContentPresenter" Property="Grid.Column" Value="0" />
|
|
<Setter TargetName="OnContentPresenter" Property="Grid.Column" Value="0" />
|
|
<Setter TargetName="ColumnDefinition_LeftGap" Property="Width" Value="{StaticResource ToggleSwitchLabelGapGL}" />
|
|
<Setter TargetName="ColumnDefinition_RightGap" Property="Width" Value="0" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultToggleSwitch}" TargetType="{x:Type ui:ToggleSwitch}" />
|
|
|
|
<!-- Expander for Setting Window -->
|
|
<Style x:Key="ExpanderRightHeaderStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Border Padding="{TemplateBinding Padding}">
|
|
<Grid Background="Transparent" SnapsToDevicePixels="False">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="19" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.LayoutTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="-90" />
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Grid.LayoutTransform>
|
|
<Ellipse
|
|
x:Name="circle"
|
|
Width="19"
|
|
Height="19"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stroke="DarkGray" />
|
|
<Path
|
|
x:Name="arrow"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M 1,1.5 L 4.5,5 L 8,1.5"
|
|
SnapsToDevicePixels="false"
|
|
Stroke="#666"
|
|
StrokeThickness="2" />
|
|
</Grid>
|
|
<ContentPresenter
|
|
Grid.Row="1"
|
|
Margin="0 4 0 0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="True" />
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="#FF3C7FB1" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="#222" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="#FF526C7B" />
|
|
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="#FF003366" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ExpanderUpHeaderStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Border Padding="{TemplateBinding Padding}">
|
|
<Grid Background="Transparent" SnapsToDevicePixels="False">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="19" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid>
|
|
<Grid.LayoutTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="180" />
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Grid.LayoutTransform>
|
|
<Ellipse
|
|
x:Name="circle"
|
|
Width="19"
|
|
Height="19"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stroke="Transparent" />
|
|
<Path
|
|
x:Name="arrow"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M 1,1.5 L 4.5,5 L 8,1.5"
|
|
SnapsToDevicePixels="false"
|
|
Stroke="#666"
|
|
StrokeThickness="1" />
|
|
</Grid>
|
|
<ContentPresenter
|
|
Grid.Column="1"
|
|
Margin="4 0 0 0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="True" />
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="#222" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
|
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="#FF003366" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ExpanderLeftHeaderStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Border Padding="{TemplateBinding Padding}">
|
|
<Grid Background="Transparent" SnapsToDevicePixels="False">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="19" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid>
|
|
<Grid.LayoutTransform>
|
|
<TransformGroup>
|
|
<TransformGroup.Children>
|
|
<TransformCollection>
|
|
<RotateTransform Angle="90" />
|
|
</TransformCollection>
|
|
</TransformGroup.Children>
|
|
</TransformGroup>
|
|
</Grid.LayoutTransform>
|
|
<Ellipse
|
|
x:Name="circle"
|
|
Width="19"
|
|
Height="19"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stroke="DarkGray" />
|
|
<Path
|
|
x:Name="arrow"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M 1,1.5 L 4.5,5 L 8,1.5"
|
|
SnapsToDevicePixels="false"
|
|
Stroke="#666"
|
|
StrokeThickness="2" />
|
|
</Grid>
|
|
<ContentPresenter
|
|
Grid.Row="1"
|
|
Margin="0 4 0 0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="True" />
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="#FF3C7FB1" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="#222" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="#FF526C7B" />
|
|
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="#FF003366" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ExpanderHeaderFocusVisual">
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Border>
|
|
<Rectangle
|
|
Margin="0"
|
|
SnapsToDevicePixels="true"
|
|
Stroke="{DynamicResource Color05B}"
|
|
StrokeDashArray="1 2"
|
|
StrokeThickness="1" />
|
|
</Border>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="ExpanderDownHeaderStyle" TargetType="{x:Type ToggleButton}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
|
<Border Padding="{TemplateBinding Padding}">
|
|
<Grid Background="Transparent" SnapsToDevicePixels="False">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ContentPresenter
|
|
Grid.Column="0"
|
|
Margin="0 0 0 0"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding Content}"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="True" />
|
|
<Grid
|
|
x:Name="ChevronGrid"
|
|
Grid.Column="1"
|
|
Margin="0"
|
|
VerticalAlignment="Center"
|
|
Background="Transparent"
|
|
RenderTransformOrigin="0.5, 0.5">
|
|
<Grid.RenderTransform>
|
|
<RotateTransform Angle="0" />
|
|
</Grid.RenderTransform>
|
|
<Ellipse
|
|
x:Name="circle"
|
|
Width="19"
|
|
Height="19"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stroke="Transparent" />
|
|
<Path
|
|
x:Name="arrow"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M 1,1.5 L 4.5,5 L 8,1.5"
|
|
SnapsToDevicePixels="false"
|
|
Stroke="#666"
|
|
StrokeThickness="1" />
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="true">
|
|
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color05B}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
|
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color17B}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Explorer Plugin Expander -->
|
|
<Style x:Key="ExpanderHeaderRightArrowStyle" TargetType="ToggleButton">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Border
|
|
x:Name="RootBorder"
|
|
Padding="16 15 16 15"
|
|
Background="Transparent">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ContentPresenter
|
|
Grid.Column="0"
|
|
Margin="8 0 0 0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="True" />
|
|
|
|
<Grid
|
|
x:Name="ChevronGrid"
|
|
Grid.Column="1"
|
|
Width="20"
|
|
Height="20"
|
|
Margin="8 0 4 0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Background="Transparent"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<Grid.RenderTransform>
|
|
<RotateTransform Angle="0" />
|
|
</Grid.RenderTransform>
|
|
<Ellipse
|
|
x:Name="circle"
|
|
Width="19"
|
|
Height="19"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stroke="Transparent" />
|
|
<Path
|
|
x:Name="arrow"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="M 1,1.5 L 4.5,5 L 8,1.5"
|
|
SnapsToDevicePixels="False"
|
|
Stroke="#666"
|
|
StrokeThickness="1" />
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="arrow" Property="Data" Value="M 1,4.5 L 4.5,1 L 8,4.5" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="RootBorder" Property="Background" Value="{DynamicResource CustomExpanderHover}" />
|
|
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color05B}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="circle" Property="Stroke" Value="Transparent" />
|
|
<Setter TargetName="circle" Property="StrokeThickness" Value="1.5" />
|
|
<Setter TargetName="arrow" Property="Stroke" Value="{DynamicResource Color17B}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ExpanderStyle1" TargetType="{x:Type Expander}">
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="1" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Expander}">
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="3"
|
|
SnapsToDevicePixels="true">
|
|
<DockPanel>
|
|
<ToggleButton
|
|
x:Name="HeaderSite"
|
|
MinWidth="0"
|
|
MinHeight="0"
|
|
Margin="18 0 18 0"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
|
|
DockPanel.Dock="Top"
|
|
FocusVisualStyle="{DynamicResource ExpanderHeaderFocusVisual}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontStretch="{TemplateBinding FontStretch}"
|
|
FontStyle="{TemplateBinding FontStyle}"
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
IsChecked="{Binding IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Style="{StaticResource ExpanderDownHeaderStyle}" />
|
|
<Border x:Name="ContentPresenterBorder">
|
|
<ContentPresenter
|
|
x:Name="ExpandSite"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
DockPanel.Dock="Bottom"
|
|
Focusable="false" />
|
|
<Border.LayoutTransform>
|
|
<ScaleTransform ScaleY="0" />
|
|
</Border.LayoutTransform>
|
|
</Border>
|
|
</DockPanel>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsExpanded" Value="true">
|
|
<Setter TargetName="ExpandSite" Property="Visibility" Value="Visible" />
|
|
<Setter TargetName="ContentPresenterBorder" Property="BorderThickness" Value="0 1 0 0" />
|
|
<Trigger.EnterActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="ContentPresenterBorder"
|
|
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
|
|
From="0.0"
|
|
To="1.0"
|
|
Duration="00:00:00.00" />
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="ContentPresenterBorder"
|
|
Storyboard.TargetProperty="(Border.Opacity)"
|
|
From="0.0"
|
|
To="1.0"
|
|
Duration="00:00:00.00" />
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.EnterActions>
|
|
<Trigger.ExitActions>
|
|
<BeginStoryboard>
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="ContentPresenterBorder"
|
|
Storyboard.TargetProperty="(Border.LayoutTransform).(ScaleTransform.ScaleY)"
|
|
From="1.0"
|
|
To="0"
|
|
Duration="00:00:00.00" />
|
|
<!-- Animation 00:00:00.167 -->
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="ContentPresenterBorder"
|
|
Storyboard.TargetProperty="(Border.Opacity)"
|
|
From="1.0"
|
|
To="0.0"
|
|
Duration="00:00:00.00" />
|
|
<!-- Animation 00:00:00.167 -->
|
|
</Storyboard>
|
|
</BeginStoryboard>
|
|
</Trigger.ExitActions>
|
|
</Trigger>
|
|
<Trigger Property="ExpandDirection" Value="Right">
|
|
<Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Right" />
|
|
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
|
|
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderRightHeaderStyle}" />
|
|
</Trigger>
|
|
<Trigger Property="ExpandDirection" Value="Up">
|
|
<Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Top" />
|
|
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
|
|
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderUpHeaderStyle}" />
|
|
</Trigger>
|
|
<Trigger Property="ExpandDirection" Value="Left">
|
|
<Setter TargetName="ExpandSite" Property="DockPanel.Dock" Value="Left" />
|
|
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
|
|
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource ExpanderLeftHeaderStyle}" />
|
|
</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="DefaultRepeatButtonStyle" TargetType="RepeatButton">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource RepeatButtonBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource NumberBoxColor26B}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThemeThickness}" />
|
|
<Setter Property="Padding" Value="{DynamicResource ButtonPadding}" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
|
|
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="-3" />
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RepeatButton">
|
|
<Border
|
|
x:Name="Background"
|
|
Background="{TemplateBinding Background}"
|
|
CornerRadius="4"
|
|
SnapsToDevicePixels="True">
|
|
<Border
|
|
x:Name="Border"
|
|
Padding="{TemplateBinding Padding}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
|
<ContentPresenter
|
|
x:Name="ContentPresenter"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Focusable="False"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Border>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource NumberBoxColor23B}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrushPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NumberBoxColor26B}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource NumberBoxColor24B}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrushPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NumberBoxColor25B}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Background" Property="Background" Value="transparent" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource RepeatButtonBorderBrushDisabled}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NumberBoxColor25B}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultRepeatButtonStyle}" TargetType="RepeatButton" />
|
|
|
|
<!-- Text Button style for Plugin Area -->
|
|
<Style x:Key="LinkBtnStyle" TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="{DynamicResource PluginInfoColor}" />
|
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="Cursor" Value="Hand" />
|
|
<Setter Property="FontFamily" Value="/Resources/#Segoe Fluent Icons" />
|
|
<Setter Property="FontSize" Value="11" />
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!-- Content Dialog -->
|
|
<Style x:Key="ContentDialog" TargetType="ui:ContentDialog">
|
|
<Setter Property="Foreground" Value="{DynamicResource PopupTextColor}" />
|
|
<Setter Property="Background" Value="{DynamicResource PopupBGColor}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource ContentDialogBorderWidth}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ContentDialogBorderBrush}" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="CornerRadius" Value="{DynamicResource OverlayCornerRadius}" />
|
|
<Setter Property="PrimaryButtonStyle" Value="{DynamicResource DefaultButtonStyle}" />
|
|
<Setter Property="SecondaryButtonStyle" Value="{DynamicResource DefaultButtonStyle}" />
|
|
<Setter Property="CloseButtonStyle" Value="{DynamicResource DefaultButtonStyle}" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="IsShadowEnabled" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:ContentDialog">
|
|
<Border x:Name="Container">
|
|
<VisualStateManager.CustomVisualStateManager>
|
|
<ui:SimpleVisualStateManager />
|
|
</VisualStateManager.CustomVisualStateManager>
|
|
<Grid
|
|
x:Name="LayoutRoot"
|
|
Background="{DynamicResource ContentDialogOverlayBG}"
|
|
SnapsToDevicePixels="True"
|
|
Visibility="Collapsed">
|
|
<Grid
|
|
x:Name="BackgroundElement"
|
|
MinWidth="{DynamicResource ContentDialogMinWidth}"
|
|
MinHeight="{DynamicResource ContentDialogMinHeight}"
|
|
MaxWidth="{DynamicResource ContentDialogMaxWidth}"
|
|
MaxHeight="{DynamicResource ContentDialogMaxHeight}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
FlowDirection="{TemplateBinding FlowDirection}"
|
|
RenderTransformOrigin="0.5,0.5">
|
|
<Grid.RenderTransform>
|
|
<ScaleTransform x:Name="ScaleTransform" />
|
|
</Grid.RenderTransform>
|
|
<ui:ThemeShadowChrome
|
|
x:Name="Shdw"
|
|
Margin="{DynamicResource ContentDialogBorderWidth}"
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
|
IsShadowEnabled="{TemplateBinding IsShadowEnabled}" />
|
|
<Border
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding CornerRadius}">
|
|
<Border x:Name="DialogSpace" Padding="0">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition x:Name="CommandSpaceRow" Height="80" />
|
|
</Grid.RowDefinitions>
|
|
<ui:ScrollViewerEx
|
|
x:Name="ContentScrollViewer"
|
|
Margin="{DynamicResource ContentDialogContentScrollViewerMargin}"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
IsTabStop="False"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
|
<Grid Margin="{DynamicResource ContentDialogPadding}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<ContentControl
|
|
x:Name="Title"
|
|
Margin="{DynamicResource ContentDialogTitleMargin}"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
Content="{TemplateBinding Title}"
|
|
ContentTemplate="{TemplateBinding TitleTemplate}"
|
|
FontFamily="{DynamicResource {x:Static SystemFonts.MessageFontFamilyKey}}"
|
|
FontSize="20"
|
|
FontWeight="Normal"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
IsTabStop="False"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
|
|
<ContentControl.Template>
|
|
<ControlTemplate TargetType="ContentControl">
|
|
<ui:ContentPresenterEx
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
TextWrapping="Wrap" />
|
|
</ControlTemplate>
|
|
</ContentControl.Template>
|
|
</ContentControl>
|
|
<ui:ContentPresenterEx
|
|
x:Name="Content"
|
|
Grid.Row="1"
|
|
Margin="{DynamicResource ContentDialogContentMargin}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.FontFamily="{DynamicResource ContentControlThemeFontFamily}"
|
|
TextElement.FontSize="{DynamicResource ControlContentThemeFontSize}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</ui:ScrollViewerEx>
|
|
<Border
|
|
x:Name="ButtonAreaBorder"
|
|
Grid.Row="1"
|
|
Padding="26 0 26 0"
|
|
Background="{DynamicResource PopupButtonAreaBGColor}"
|
|
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
|
|
BorderThickness="0 1 0 0"
|
|
CornerRadius="0 0 8 8">
|
|
<Grid
|
|
x:Name="CommandSpace"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
KeyboardNavigation.DirectionalNavigation="Contained">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition />
|
|
<ColumnDefinition Width="0.5*" />
|
|
<ColumnDefinition Width="0.5*" />
|
|
<ColumnDefinition />
|
|
</Grid.ColumnDefinitions>
|
|
<Button
|
|
x:Name="PrimaryButton"
|
|
Grid.Column="0"
|
|
Margin="0 0 2 0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Content="{TemplateBinding PrimaryButtonText}"
|
|
IsEnabled="{TemplateBinding IsPrimaryButtonEnabled}"
|
|
Style="{TemplateBinding PrimaryButtonStyle}" />
|
|
<Button
|
|
x:Name="SecondaryButton"
|
|
Grid.Column="1"
|
|
Grid.ColumnSpan="2"
|
|
Margin="2 0 2 0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Content="{TemplateBinding SecondaryButtonText}"
|
|
IsEnabled="{TemplateBinding IsSecondaryButtonEnabled}"
|
|
Style="{TemplateBinding SecondaryButtonStyle}" />
|
|
<Button
|
|
x:Name="CloseButton"
|
|
Grid.Column="3"
|
|
Margin="2 0 0 0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Content="{TemplateBinding CloseButtonText}"
|
|
Style="{TemplateBinding CloseButtonStyle}" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="DialogShowingStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition To="DialogHidden">
|
|
<Storyboard>
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="SnapsToDevicePixels">
|
|
<DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="IsHitTestVisible">
|
|
<DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleX">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0.1,0.9 0.2,1.0"
|
|
KeyTime="0:0:0.5"
|
|
Value="1.05" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleY">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0.1,0.9 0.2,1.0"
|
|
KeyTime="0:0:0.5"
|
|
Value="1.05" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
|
|
<LinearDoubleKeyFrame KeyTime="0:0:0.083" Value="0.0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<VisualTransition To="DialogShowing">
|
|
<Storyboard>
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="SnapsToDevicePixels">
|
|
<DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="False" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleX">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.05" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0.1,0.9 0.2,1.0"
|
|
KeyTime="0:0:0.5"
|
|
Value="1.0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="ScaleTransform" Storyboard.TargetProperty="ScaleY">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.05" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0.1,0.9 0.2,1.0"
|
|
KeyTime="0:0:0.5"
|
|
Value="1.0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.0" />
|
|
<LinearDoubleKeyFrame KeyTime="0:0:0.167" Value="1.0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="DialogHidden" />
|
|
<VisualState x:Name="DialogShowing">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="(KeyboardNavigation.TabNavigation)">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static KeyboardNavigationMode.Cycle}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="DialogShowingWithoutSmokeLayer">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Null}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="DialogSizingStates">
|
|
<VisualState x:Name="DefaultDialogSizing" />
|
|
<VisualState x:Name="FullDialogSizing">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="VerticalAlignment">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static VerticalAlignment.Stretch}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="ButtonsVisibilityStates">
|
|
<VisualState x:Name="AllVisible" />
|
|
<VisualState x:Name="NoneVisible">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CommandSpace" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<!--
|
|
If the window has no buttons, it's assumed that the buttons are drawn directly within the window itself (as in the case of the HotkeyDialog).
|
|
In this case, the command space area is completely hidden.
|
|
-->
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonAreaBorder" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CommandSpaceRow" Storyboard.TargetProperty="Height">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static GridLength.Auto}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PrimaryVisible">
|
|
<Storyboard>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="1" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="0,0,0,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="SecondaryVisible">
|
|
<Storyboard>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="1" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="0,0,0,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="CloseVisible">
|
|
<Storyboard>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="1" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="0,0,0,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PrimaryAndSecondaryVisible">
|
|
<Storyboard>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="2,0,0,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PrimaryAndCloseVisible">
|
|
<Storyboard>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="2,0,0,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="SecondaryAndCloseVisible">
|
|
<Storyboard>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="0" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="0,0,2,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="(Grid.ColumnSpan)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</Int32AnimationUsingKeyFrames>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="CloseButton" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0:0:0" Value="2,0,0,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="DefaultButtonStates">
|
|
<VisualState x:Name="NoDefaultButton" />
|
|
<VisualState x:Name="PrimaryAsDefaultButton" />
|
|
<VisualState x:Name="SecondaryAsDefaultButton" />
|
|
<VisualState x:Name="CloseAsDefaultButton" />
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="DialogBorderStates">
|
|
<VisualState x:Name="NoBorder" />
|
|
<VisualState x:Name="AccentColorBorder">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackgroundElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{DynamicResource SystemControlForegroundAccentBrush}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsShadowEnabled" Value="False">
|
|
<Setter TargetName="Shdw" Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="DefaultButton" Value="Primary">
|
|
<Setter TargetName="PrimaryButton" Property="Style" Value="{DynamicResource AccentButtonStyle}" />
|
|
</Trigger>
|
|
<Trigger Property="DefaultButton" Value="Secondary">
|
|
<Setter TargetName="SecondaryButton" Property="Style" Value="{DynamicResource AccentButtonStyle}" />
|
|
</Trigger>
|
|
<Trigger Property="DefaultButton" Value="Close">
|
|
<Setter TargetName="CloseButton" Property="Style" Value="{DynamicResource AccentButtonStyle}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Navigation View -->
|
|
<system:Double x:Key="NavigationViewCompactPaneLength">48</system:Double>
|
|
|
|
<Style x:Key="DefaultContentControlStyle" TargetType="ContentControl">
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ContentControl">
|
|
<ContentPresenter
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="MUX_NavigationViewItemPresenterStyleWhenOnLeftPane" TargetType="ui:NavigationViewItemPresenter">
|
|
<Setter Property="Foreground" Value="{DynamicResource NavigationViewItemForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource NavigationViewItemBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource NavigationViewItemBorderThickness}" />
|
|
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:NavigationViewItemPresenter">
|
|
<Grid
|
|
x:Name="LayoutRoot"
|
|
MinHeight="{DynamicResource NavigationViewItemOnLeftMinHeight}"
|
|
Background="{TemplateBinding Background}">
|
|
<Grid.Resources>
|
|
<Storyboard x:Key="ExpandCollapseRotateExpandedStoryboard">
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="ExpandCollapseChevronRotateTransform"
|
|
Storyboard.TargetProperty="Angle"
|
|
From="0.0"
|
|
To="180.0"
|
|
Duration="0:0:0.1" />
|
|
</Storyboard>
|
|
<Storyboard x:Key="ExpandCollapseRotateCollapsedStoryboard">
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="ExpandCollapseChevronRotateTransform"
|
|
Storyboard.TargetProperty="Angle"
|
|
From="180.0"
|
|
To="0.0"
|
|
Duration="0:0:0.1" />
|
|
</Storyboard>
|
|
</Grid.Resources>
|
|
|
|
<Border
|
|
x:Name="RevealBorder"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="5" />
|
|
<Grid x:Name="PresenterContentRootGrid">
|
|
<!-- Wrap SelectionIndicator in a grid so that its offset is 0,0 - this enables the offset animation. -->
|
|
<Grid
|
|
Margin="0 0 0 0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center">
|
|
|
|
<Rectangle
|
|
x:Name="SelectionIndicator"
|
|
Width="4"
|
|
Height="16"
|
|
Fill="{DynamicResource NavigationViewSelectionIndicatorForeground}"
|
|
Opacity="0.0"
|
|
RadiusX="2"
|
|
RadiusY="2" />
|
|
</Grid>
|
|
|
|
<Grid
|
|
x:Name="ContentGrid"
|
|
MinHeight="{DynamicResource NavigationViewItemOnLeftMinHeight}"
|
|
HorizontalAlignment="Stretch">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="IconColumn" ui:ColumnDefinitionHelper.PixelWidth="{DynamicResource NavigationViewCompactPaneLength}" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Viewbox
|
|
x:Name="IconBox"
|
|
Height="24"
|
|
Margin="{DynamicResource NavigationViewItemOnLeftIconBoxMargin}">
|
|
<ContentPresenter x:Name="Icon" Content="{TemplateBinding Icon}" />
|
|
</Viewbox>
|
|
|
|
<!-- Padding="{TemplateBinding Padding}" -->
|
|
<ContentPresenter
|
|
x:Name="ContentPresenter"
|
|
Grid.Column="1"
|
|
Margin="{DynamicResource NavigationViewItemContentPresenterMargin}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" />
|
|
|
|
<Grid
|
|
x:Name="ExpandCollapseChevron"
|
|
Grid.Column="2"
|
|
Width="40"
|
|
Margin="{DynamicResource NavigationViewItemExpandChevronMargin}"
|
|
HorizontalAlignment="Right"
|
|
Background="Transparent"
|
|
Visibility="Collapsed">
|
|
<ui:FontIconFallback
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="{DynamicResource NavigationViewItemExpandedPath}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="{DynamicResource NavigationViewItemExpandedGlyphFontSize}"
|
|
Foreground="{DynamicResource NavigationViewItemForeground}"
|
|
RenderTransformOrigin="0.5, 0.5">
|
|
<ui:FontIconFallback.RenderTransform>
|
|
<RotateTransform x:Name="ExpandCollapseChevronRotateTransform" Angle="0" />
|
|
</ui:FontIconFallback.RenderTransform>
|
|
</ui:FontIconFallback>
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="PointerStates">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="PointerStatesListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="Normal" />
|
|
<VisualState x:Name="PointerOver" />
|
|
<VisualState x:Name="Pressed" />
|
|
<VisualState x:Name="Selected" />
|
|
<VisualState x:Name="PointerOverSelected" />
|
|
<VisualState x:Name="PressedSelected" />
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="DisabledStates">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="DisabledStatesListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="Enabled" />
|
|
<VisualState x:Name="Disabled" />
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="IconStates">
|
|
<VisualState x:Name="IconVisible" />
|
|
<VisualState x:Name="IconCollapsed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconBox" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="IconColumn" Storyboard.TargetProperty="Width">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<GridLength>16</GridLength>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="ChevronStates">
|
|
<VisualState x:Name="ChevronHidden" />
|
|
<VisualState x:Name="ChevronVisibleOpen">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevron" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="ChevronVisibleClosed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ExpandCollapseChevron" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="PaneAndTopLevelItemStates">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="PaneAndTopLevelItemStatesListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="NotClosedCompactAndTopLevelItem" />
|
|
<VisualState x:Name="ClosedCompactAndTopLevelItem" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOver">
|
|
<Setter TargetName="RevealBorder" Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrushPointerOver}" />
|
|
<Setter TargetName="RevealBorder" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="Pressed">
|
|
<Setter TargetName="RevealBorder" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="RevealBorder" Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrushPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="Selected">
|
|
<!--<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundSelected}" />-->
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundSelected}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundSelected}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOverSelected">
|
|
<Setter TargetName="RevealBorder" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundSelectedPointerOver}" />
|
|
<Setter TargetName="RevealBorder" Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrushSelectedPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundSelectedPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundSelectedPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PressedSelected">
|
|
<Setter TargetName="RevealBorder" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundSelectedPressed}" />
|
|
<Setter TargetName="RevealBorder" Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrushSelectedPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundSelectedPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundSelectedPressed}" />
|
|
</Trigger>
|
|
|
|
<Trigger SourceName="DisabledStatesListener" Property="CurrentStateName" Value="Disabled">
|
|
<Setter TargetName="RevealBorder" Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrushCheckedDisabled}" />
|
|
<Setter TargetName="LayoutRoot" Property="Opacity" Value="{DynamicResource ListViewItemDisabledThemeOpacity}" />
|
|
</Trigger>
|
|
|
|
<Trigger SourceName="PaneAndTopLevelItemStatesListener" Property="CurrentStateName" Value="ClosedCompactAndTopLevelItem">
|
|
<Setter TargetName="ContentPresenter" Property="Margin" Value="{DynamicResource NavigationViewCompactItemContentPresenterMargin}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="ui:NavigationView">
|
|
<Setter Property="PaneToggleButtonStyle" Value="{DynamicResource PaneToggleButtonStyle}" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="CompactPaneLength" Value="{DynamicResource NavigationViewCompactPaneLength}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:NavigationView">
|
|
<Grid x:Name="RootGrid" KeyboardNavigation.TabNavigation="Local">
|
|
<!-- Button grid -->
|
|
<Grid
|
|
x:Name="PaneToggleButtonGrid"
|
|
Margin="0 0 0 8"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
Canvas.ZIndex="100"
|
|
KeyboardNavigation.TabIndex="0"
|
|
KeyboardNavigation.TabNavigation="Local">
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid x:Name="TogglePaneTopPadding" Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPadding}" />
|
|
|
|
<Grid x:Name="ButtonHolderGrid" Grid.Row="1">
|
|
<Button
|
|
x:Name="NavigationViewBackButton"
|
|
VerticalAlignment="Top"
|
|
IsEnabled="{TemplateBinding IsBackEnabled}"
|
|
Style="{DynamicResource NavigationBackButtonNormalStyle}"
|
|
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.BackButtonVisibility}">
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip x:Name="NavigationViewBackButtonToolTip" />
|
|
</ToolTipService.ToolTip>
|
|
</Button>
|
|
<Button
|
|
x:Name="NavigationViewCloseButton"
|
|
VerticalAlignment="Top"
|
|
Style="{DynamicResource NavigationBackButtonNormalStyle}">
|
|
<ToolTipService.ToolTip>
|
|
<ToolTip x:Name="NavigationViewCloseButtonToolTip" />
|
|
</ToolTipService.ToolTip>
|
|
</Button>
|
|
<Button
|
|
x:Name="TogglePaneButton"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Top"
|
|
Style="{TemplateBinding PaneToggleButtonStyle}"
|
|
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.PaneToggleButtonVisibility}">
|
|
<TextBlock
|
|
x:Name="PaneTitleTextBlock"
|
|
Grid.Column="0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Style="{DynamicResource NavigationViewItemHeaderTextStyle}"
|
|
Text="{TemplateBinding PaneTitle}" />
|
|
</Button>
|
|
<Grid x:Name="PaneTitleHolder" Visibility="Collapsed">
|
|
<ContentControl
|
|
x:Name="PaneTitlePresenter"
|
|
Margin="{DynamicResource NavigationViewPaneTitlePresenterMargin}"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
<!-- Content layouts -->
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- DisplayMode top -->
|
|
<StackPanel
|
|
x:Name="TopNavArea"
|
|
Grid.Row="0"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Top"
|
|
Background="{DynamicResource NavigationViewTopPaneBackground}"
|
|
Canvas.ZIndex="1">
|
|
|
|
<Grid
|
|
x:Name="TopNavTopPadding"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPadding}"
|
|
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPaneVisibility}" />
|
|
|
|
<Grid
|
|
x:Name="TopNavGrid"
|
|
Height="{DynamicResource NavigationViewTopPaneHeight}"
|
|
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPaneVisibility}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="BackButtonPlaceholderOnTopNav" ui:ColumnDefinitionHelper.PixelWidth="{DynamicResource NavigationBackButtonWidth}" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" MinWidth="{DynamicResource TopNavigationViewPaneCustomContentMinWidth}" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid
|
|
x:Name="TopNavLeftPadding"
|
|
Grid.Column="1"
|
|
Width="0" />
|
|
|
|
<ContentControl
|
|
x:Name="PaneHeaderOnTopPane"
|
|
Grid.Column="2"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
|
|
<ContentControl
|
|
x:Name="PaneTitleOnTopPane"
|
|
Grid.Column="2"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
|
|
<!-- Top nav ItemsRepeater -->
|
|
<ui:ItemsRepeaterScrollHost Grid.Column="3">
|
|
<ui:ScrollViewerEx HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden">
|
|
<ui:ItemsRepeater x:Name="TopNavMenuItemsHost" AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}">
|
|
<ui:ItemsRepeater.Layout>
|
|
<ui:StackLayout Orientation="Horizontal" />
|
|
</ui:ItemsRepeater.Layout>
|
|
</ui:ItemsRepeater>
|
|
</ui:ScrollViewerEx>
|
|
</ui:ItemsRepeaterScrollHost>
|
|
|
|
<Button
|
|
x:Name="TopNavOverflowButton"
|
|
Grid.Column="4"
|
|
Margin="{DynamicResource TopNavigationViewOverflowButtonMargin}"
|
|
Content="More"
|
|
Style="{StaticResource NavigationViewOverflowButtonStyleWhenPaneOnTop}"
|
|
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.OverflowButtonVisibility}">
|
|
|
|
<ui:FlyoutService.Flyout>
|
|
<ui:Flyout Placement="BottomEdgeAlignedRight">
|
|
<ui:Flyout.FlyoutPresenterStyle>
|
|
<Style TargetType="ui:FlyoutPresenter">
|
|
<Setter Property="Padding" Value="{DynamicResource TopNavigationViewOverflowMenuPadding}" />
|
|
<!-- Set negative top margin to make the flyout align exactly with the button -->
|
|
<!--<Setter Property="Margin" Value="0,-4,0,0" />-->
|
|
</Style>
|
|
</ui:Flyout.FlyoutPresenterStyle>
|
|
<ui:ItemsRepeaterScrollHost>
|
|
<ui:ScrollViewerEx VerticalScrollBarVisibility="Auto">
|
|
<ui:ItemsRepeater x:Name="TopNavMenuItemsOverflowHost" />
|
|
</ui:ScrollViewerEx>
|
|
</ui:ItemsRepeaterScrollHost>
|
|
</ui:Flyout>
|
|
</ui:FlyoutService.Flyout>
|
|
</Button>
|
|
|
|
<ContentControl
|
|
x:Name="PaneCustomContentOnTopPane"
|
|
Grid.Column="5"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
|
|
<Grid
|
|
x:Name="TopPaneAutoSuggestArea"
|
|
Grid.Column="6"
|
|
Height="{DynamicResource NavigationViewTopPaneHeight}">
|
|
|
|
<ContentControl
|
|
x:Name="TopPaneAutoSuggestBoxPresenter"
|
|
MinWidth="48"
|
|
Margin="{DynamicResource TopNavigationViewAutoSuggestBoxMargin}"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Center"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
</Grid>
|
|
|
|
<ContentControl
|
|
x:Name="PaneFooterOnTopPane"
|
|
Grid.Column="7"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
<!-- Top footer menu ItemsRepeater -->
|
|
<ui:ItemsRepeater x:Name="TopFooterMenuItemsHost" Grid.Column="8">
|
|
<ui:ItemsRepeater.Layout>
|
|
<ui:StackLayout Orientation="Horizontal" />
|
|
</ui:ItemsRepeater.Layout>
|
|
</ui:ItemsRepeater>
|
|
|
|
</Grid>
|
|
<Border x:Name="TopNavContentOverlayAreaGrid" helper:BorderHelper.Child="{TemplateBinding ContentOverlay}" />
|
|
</StackPanel>
|
|
|
|
<!-- Displaymode (compact/minimal/normal) left -->
|
|
<ui:SplitView
|
|
x:Name="RootSplitView"
|
|
Grid.Row="1"
|
|
Background="{TemplateBinding Background}"
|
|
CompactPaneLength="{TemplateBinding CompactPaneLength}"
|
|
DisplayMode="Inline"
|
|
IsPaneOpen="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsPaneOpen, Mode=TwoWay}"
|
|
IsTabStop="False"
|
|
OpenPaneLength="{TemplateBinding OpenPaneLength}"
|
|
PaneBackground="Transparent">
|
|
|
|
<ui:SplitView.Pane>
|
|
<Grid
|
|
x:Name="PaneContentGrid"
|
|
Margin="12 0 12 0"
|
|
HorizontalAlignment="Left"
|
|
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.LeftPaneVisibility}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="0" />
|
|
<!-- above button margin + back button space -->
|
|
<RowDefinition x:Name="PaneContentGridToggleButtonRow" Height="Auto" />
|
|
<!-- MinHeight="{DynamicResource NavigationViewPaneHeaderRowMinHeight}" /> -->
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="8" />
|
|
<!-- above list margin -->
|
|
<RowDefinition x:Name="ItemsContainerRow" Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid x:Name="ContentPaneTopPadding" Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPadding}" />
|
|
|
|
<Grid Grid.Row="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition x:Name="PaneHeaderContentBorderRow" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition x:Name="PaneHeaderCloseButtonColumn" />
|
|
<ColumnDefinition x:Name="PaneHeaderToggleButtonColumn" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ContentControl
|
|
x:Name="PaneHeaderContentBorder"
|
|
Grid.Column="2"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
</Grid>
|
|
|
|
<Grid
|
|
x:Name="AutoSuggestArea"
|
|
Grid.Row="3"
|
|
Height="{DynamicResource NavigationViewTopPaneHeight}"
|
|
VerticalAlignment="Center">
|
|
|
|
<ContentControl
|
|
x:Name="PaneAutoSuggestBoxPresenter"
|
|
Margin="{DynamicResource NavigationViewAutoSuggestBoxMargin}"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Center"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
|
|
<Button
|
|
x:Name="PaneAutoSuggestButton"
|
|
Width="{TemplateBinding CompactPaneLength}"
|
|
Style="{DynamicResource NavigationViewPaneSearchButtonStyle}"
|
|
Visibility="Collapsed" />
|
|
</Grid>
|
|
|
|
<ContentControl
|
|
x:Name="PaneCustomContentBorder"
|
|
Grid.Row="4"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
|
|
<!-- "Non header" content -->
|
|
<Grid
|
|
x:Name="ItemsContainerGrid"
|
|
Grid.Row="6"
|
|
Margin="0 0 0 8">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition
|
|
x:Name="MenuItemsRow"
|
|
Height="Auto"
|
|
MinHeight="{DynamicResource NavigationViewItemOnLeftMinHeight}" />
|
|
<!-- MenuItems -->
|
|
<RowDefinition Height="*" MinHeight="21" />
|
|
<!-- Fill spacing -->
|
|
<RowDefinition Height="Auto" />
|
|
<!-- PaneFooter -->
|
|
<RowDefinition
|
|
x:Name="FooterItemsRow"
|
|
Height="Auto"
|
|
MinHeight="{DynamicResource NavigationViewItemOnLeftMinHeight}" />
|
|
<!-- FooterItems -->
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- MenuItems -->
|
|
<ui:ItemsRepeaterScrollHost HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
|
<ui:ScrollViewerEx
|
|
x:Name="MenuItemsScrollViewer"
|
|
KeyboardNavigation.TabNavigation="Local"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<!-- Left nav ItemsRepeater -->
|
|
<ui:ItemsRepeater x:Name="MenuItemsHost" AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}" />
|
|
</ui:ScrollViewerEx>
|
|
</ui:ItemsRepeaterScrollHost>
|
|
|
|
<ui:NavigationViewItemSeparator
|
|
x:Name="VisualItemsSeparator"
|
|
Grid.Row="1"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
Visibility="Collapsed" />
|
|
|
|
<!-- PaneFooter -->
|
|
<ContentControl
|
|
x:Name="FooterContentBorder"
|
|
Grid.Row="2"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DefaultContentControlStyle}" />
|
|
|
|
<!-- FooterItems -->
|
|
<ui:ItemsRepeaterScrollHost Grid.Row="3">
|
|
<ui:ScrollViewerEx x:Name="FooterItemsScrollViewer">
|
|
<!-- contract7Present:VerticalAnchorRatio="1" -->
|
|
<ui:ItemsRepeater x:Name="FooterMenuItemsHost" />
|
|
</ui:ScrollViewerEx>
|
|
</ui:ItemsRepeaterScrollHost>
|
|
</Grid>
|
|
|
|
</Grid>
|
|
</ui:SplitView.Pane>
|
|
|
|
<ui:SplitView.Content>
|
|
<Grid x:Name="ContentGrid">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid
|
|
x:Name="ContentTopPadding"
|
|
Grid.ColumnSpan="2"
|
|
Height="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.TopPadding}"
|
|
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.LeftPaneVisibility}" />
|
|
|
|
<Grid x:Name="ContentLeftPadding" Grid.Row="1" />
|
|
|
|
<ContentControl
|
|
x:Name="HeaderContent"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
MinHeight="{DynamicResource PaneToggleButtonHeight}"
|
|
HorizontalContentAlignment="Stretch"
|
|
VerticalContentAlignment="Stretch"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
IsTabStop="False"
|
|
Style="{DynamicResource NavigationViewTitleHeaderContentControlTextStyle}" />
|
|
|
|
<ContentPresenter
|
|
Grid.Row="2"
|
|
Grid.ColumnSpan="2"
|
|
Content="{TemplateBinding Content}" />
|
|
</Grid>
|
|
</ui:SplitView.Content>
|
|
</ui:SplitView>
|
|
|
|
</Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="DisplayModeGroup">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="DisplayModeGroupListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="Compact" />
|
|
<VisualState x:Name="Expanded" />
|
|
<VisualState x:Name="Minimal" />
|
|
<VisualState x:Name="TopNavigationMinimal" />
|
|
<VisualState x:Name="MinimalWithBackButton" />
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="TogglePaneGroup">
|
|
<VisualState x:Name="TogglePaneButtonVisible" />
|
|
<VisualState x:Name="TogglePaneButtonCollapsed" />
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="HeaderGroup">
|
|
<VisualState x:Name="HeaderVisible" />
|
|
<VisualState x:Name="HeaderCollapsed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContent" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="AutoSuggestGroup">
|
|
<VisualState x:Name="AutoSuggestBoxVisible" />
|
|
<VisualState x:Name="AutoSuggestBoxCollapsed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="AutoSuggestArea" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TopPaneAutoSuggestArea" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="PaneStateGroup">
|
|
<VisualState x:Name="NotClosedCompact" />
|
|
<VisualState x:Name="ClosedCompact">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PaneAutoSuggestBoxPresenter" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PaneAutoSuggestButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="PaneStateListSizeGroup">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="PaneStateListSizeGroupListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="ListSizeFull" />
|
|
<VisualState x:Name="ListSizeCompact" />
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="TitleBarVisibilityGroup">
|
|
<VisualState x:Name="TitleBarVisible" />
|
|
<VisualState x:Name="TitleBarCollapsed">
|
|
<Storyboard>
|
|
<ThicknessAnimationUsingKeyFrames Storyboard.TargetName="PaneContentGrid" Storyboard.TargetProperty="Margin">
|
|
<DiscreteThicknessKeyFrame KeyTime="0" Value="0,32,0,0" />
|
|
</ThicknessAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="OverflowLabelGroup">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="OverflowLabelGroupListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="OverflowButtonWithLabel" />
|
|
<VisualState x:Name="OverflowButtonNoLabel" />
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="BackButtonGroup">
|
|
<VisualState x:Name="BackButtonVisible" />
|
|
<VisualState x:Name="BackButtonCollapsed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BackButtonPlaceholderOnTopNav" Storyboard.TargetProperty="Width">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<GridLength>0</GridLength>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="PaneVisibilityGroup">
|
|
<VisualState x:Name="PaneVisible" />
|
|
<VisualState x:Name="PaneCollapsed">
|
|
<Storyboard>
|
|
<!-- Note that RootSplitView.DisplayMode is set in code so we don't want to -->
|
|
<!-- write it here and interfere. But these values work together to hide -->
|
|
<!-- the left pane. -->
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="RootSplitView" Storyboard.TargetProperty="CompactPaneLength">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PaneToggleButtonGrid" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<Trigger SourceName="DisplayModeGroupListener" Property="CurrentStateName" Value="Expanded">
|
|
<Setter TargetName="RootSplitView" Property="PaneBackground" Value="{DynamicResource NavigationViewExpandedPaneBackground}" />
|
|
</Trigger>
|
|
<Trigger SourceName="DisplayModeGroupListener" Property="CurrentStateName" Value="Minimal">
|
|
<Setter TargetName="HeaderContent" Property="Margin" Value="{DynamicResource NavigationViewMinimalHeaderMargin}" />
|
|
</Trigger>
|
|
<Trigger SourceName="DisplayModeGroupListener" Property="CurrentStateName" Value="MinimalWithBackButton">
|
|
<Setter TargetName="HeaderContent" Property="Margin" Value="{DynamicResource NavigationViewMinimalHeaderMargin}" />
|
|
</Trigger>
|
|
|
|
<Trigger SourceName="PaneStateListSizeGroupListener" Property="CurrentStateName" Value="ListSizeCompact">
|
|
<Setter TargetName="PaneContentGrid" Property="Width" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CompactPaneLength}" />
|
|
<Setter TargetName="PaneTitleTextBlock" Property="Visibility" Value="Collapsed" />
|
|
<Setter TargetName="PaneHeaderContentBorder" Property="Visibility" Value="Collapsed" />
|
|
<Setter TargetName="PaneCustomContentBorder" Property="HorizontalAlignment" Value="Left" />
|
|
<Setter TargetName="FooterContentBorder" Property="HorizontalAlignment" Value="Left" />
|
|
</Trigger>
|
|
|
|
<Trigger SourceName="OverflowLabelGroupListener" Property="CurrentStateName" Value="OverflowButtonNoLabel">
|
|
<Setter TargetName="TopNavOverflowButton" Property="Style" Value="{DynamicResource NavigationViewOverflowButtonNoLabelStyleWhenPaneOnTop}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="ui:NavigationViewItem">
|
|
<Setter Property="Foreground" Value="{DynamicResource NavigationViewItemForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource NavigationViewItemBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource NavigationViewItemBorderThickness}" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontWeight" Value="Normal" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="Margin" Value="{DynamicResource NavigationViewItemMargin}" />
|
|
<Setter Property="UseSystemFocusVisuals" Value="True" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="Once" />
|
|
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:NavigationViewItem">
|
|
<Grid x:Name="NVIRootGrid">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ui:NavigationViewItemPresenter
|
|
x:Name="NavigationViewItemPresenter"
|
|
Margin="{TemplateBinding Margin}"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
ui:FocusVisualHelper.IsTemplateFocusTarget="True"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
Icon="{TemplateBinding Icon}"
|
|
IsTabStop="False"
|
|
UseSystemFocusVisuals="{TemplateBinding UseSystemFocusVisuals}" />
|
|
<ui:ItemsRepeater
|
|
x:Name="NavigationViewItemMenuItemsHost"
|
|
Grid.Row="1"
|
|
Visibility="Collapsed">
|
|
<ui:ItemsRepeater.Layout>
|
|
<ui:StackLayout Orientation="Vertical" />
|
|
</ui:ItemsRepeater.Layout>
|
|
</ui:ItemsRepeater>
|
|
<ui:FlyoutBase.AttachedFlyout>
|
|
<ui:Flyout x:Name="ChildrenFlyout" Placement="RightEdgeAlignedTop">
|
|
<ui:Flyout.FlyoutPresenterStyle>
|
|
<Style TargetType="ui:FlyoutPresenter">
|
|
<Setter Property="Padding" Value="{DynamicResource TopNavigationViewOverflowMenuPadding}" />
|
|
<!-- Set negative top margin to make the flyout align exactly with the button -->
|
|
<!--<Setter Property="Margin" Value="0,-4,0,0" />-->
|
|
</Style>
|
|
</ui:Flyout.FlyoutPresenterStyle>
|
|
<Grid x:Name="FlyoutRootGrid">
|
|
<Grid x:Name="FlyoutContentGrid" />
|
|
</Grid>
|
|
</ui:Flyout>
|
|
</ui:FlyoutBase.AttachedFlyout>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="ItemOnNavigationViewListPositionStates">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="ItemOnNavigationViewListPositionStatesListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="OnLeftNavigation" />
|
|
<!--
|
|
<VisualState x:Name="OnLeftNavigationReveal" />
|
|
-->
|
|
<VisualState x:Name="OnTopNavigationPrimary">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ChildrenFlyout" Storyboard.TargetProperty="Placement">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static ui:FlyoutPlacementMode.BottomEdgeAlignedLeft}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<!--
|
|
<VisualState x:Name="OnTopNavigationPrimaryReveal">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ChildrenFlyout" Storyboard.TargetProperty="Placement">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static ui:FlyoutPlacementMode.BottomEdgeAlignedLeft}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
-->
|
|
<VisualState x:Name="OnTopNavigationOverflow" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<!-- OnLeftNavigation -->
|
|
<Trigger SourceName="ItemOnNavigationViewListPositionStatesListener" Property="CurrentStateName" Value="OnLeftNavigation">
|
|
<Setter TargetName="NavigationViewItemPresenter" Property="Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnLeftPane}" />
|
|
</Trigger>
|
|
<!-- OnLeftNavigationReveal -->
|
|
<!--
|
|
<Trigger Property="CurrentStateName" Value="OnLeftNavigationReveal" SourceName="ItemOnNavigationViewListPositionStatesListener">
|
|
<Setter TargetName="NavigationViewItemPresenter" Property="Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnLeftPaneWithRevealFocus}" />
|
|
</Trigger>
|
|
-->
|
|
<!-- OnTopNavigationPrimary -->
|
|
<Trigger SourceName="ItemOnNavigationViewListPositionStatesListener" Property="CurrentStateName" Value="OnTopNavigationPrimary">
|
|
<Setter TargetName="NavigationViewItemPresenter" Property="Margin" Value="{DynamicResource TopNavigationViewItemMargin}" />
|
|
<Setter TargetName="NavigationViewItemPresenter" Property="Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnTopPane}" />
|
|
</Trigger>
|
|
<!-- OnTopNavigationPrimaryReveal -->
|
|
<!--
|
|
<Trigger Property="CurrentStateName" Value="OnTopNavigationPrimaryReveal" SourceName="ItemOnNavigationViewListPositionStatesListener">
|
|
<Setter TargetName="NavigationViewItemPresenter" Property="Margin" Value="{DynamicResource TopNavigationViewItemMargin}" />
|
|
<Setter TargetName="NavigationViewItemPresenter" Property="Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnTopPaneWithRevealFocus}" />
|
|
</Trigger>
|
|
-->
|
|
<!-- OnTopNavigationOverflow -->
|
|
<Trigger SourceName="ItemOnNavigationViewListPositionStatesListener" Property="CurrentStateName" Value="OnTopNavigationOverflow">
|
|
<Setter TargetName="NavigationViewItemPresenter" Property="Style" Value="{StaticResource MUX_NavigationViewItemPresenterStyleWhenOnTopPaneOverflow}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="ui:NavigationViewItemPresenter" />
|
|
|
|
<Style TargetType="ui:NavigationViewItemHeader">
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="MinHeight" Value="0" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:NavigationViewItemHeader">
|
|
<Grid x:Name="NavigationViewItemHeaderRootGrid">
|
|
<VisualStateManager.CustomVisualStateManager>
|
|
<ui:SimpleVisualStateManager />
|
|
</VisualStateManager.CustomVisualStateManager>
|
|
<Grid
|
|
x:Name="InnerHeaderGrid"
|
|
Height="40"
|
|
Margin="{DynamicResource NavigationViewItemInnerHeaderMargin}"
|
|
HorizontalAlignment="Left">
|
|
<TextBlock
|
|
x:Name="HeaderText"
|
|
Margin="0 -1 0 -1"
|
|
VerticalAlignment="Center"
|
|
Style="{DynamicResource NavigationViewItemHeaderTextStyle}"
|
|
Text="{TemplateBinding Content}"
|
|
TextWrapping="NoWrap" />
|
|
</Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="PaneStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition From="HeaderTextCollapsed" To="HeaderTextVisible">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="InnerHeaderGrid" Storyboard.TargetProperty="Height">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="40" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderText" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="HeaderText" Storyboard.TargetProperty="Opacity">
|
|
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="0.0" />
|
|
<LinearDoubleKeyFrame KeyTime="0:0:0.1" Value="0.0" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0.0,0.35 0.15,1.0"
|
|
KeyTime="0:0:0.2"
|
|
Value="1.0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
|
|
<VisualTransition From="HeaderTextVisible" To="HeaderTextCollapsed">
|
|
<Storyboard>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="InnerHeaderGrid" Storyboard.TargetProperty="Height">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="20" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderText" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0.2" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="HeaderText" Storyboard.TargetProperty="Opacity">
|
|
<LinearDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0.0,0.35 0.15,1.0"
|
|
KeyTime="0:0:0.1"
|
|
Value="0.0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
</VisualStateGroup.Transitions>
|
|
|
|
<VisualState x:Name="HeaderTextVisible" />
|
|
<VisualState x:Name="HeaderTextCollapsed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderText" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0:0:0" Value="{x:Static Visibility.Collapsed}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="InnerHeaderGrid" Storyboard.TargetProperty="Height">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="20" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="ui:NavigationViewItemSeparator">
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="MinHeight" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Grid x:Name="NavigationViewItemSeparatorRootGrid">
|
|
<Rectangle
|
|
x:Name="SeparatorLine"
|
|
Height="{DynamicResource NavigationViewItemSeparatorHeight}"
|
|
Margin="{DynamicResource NavigationViewItemSeparatorMargin}"
|
|
Fill="{DynamicResource NavigationViewItemSeparatorForeground}" />
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="NavigationSeparatorLineStates">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="NavigationSeparatorLineStatesListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="HorizontalLine" />
|
|
<VisualState x:Name="HorizontalLineCompact" />
|
|
<VisualState x:Name="VerticalLine" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<!-- HorizontalLineCompact -->
|
|
<Trigger SourceName="NavigationSeparatorLineStatesListener" Property="CurrentStateName" Value="HorizontalLineCompact">
|
|
<Setter TargetName="SeparatorLine" Property="Margin" Value="{DynamicResource NavigationViewCompactItemSeparatorMargin}" />
|
|
</Trigger>
|
|
<!-- VerticalLine -->
|
|
<Trigger SourceName="NavigationSeparatorLineStatesListener" Property="CurrentStateName" Value="VerticalLine">
|
|
<Setter TargetName="SeparatorLine" Property="Height" Value="20" />
|
|
<Setter TargetName="SeparatorLine" Property="Width" Value="{DynamicResource TopNavigationViewItemSeparatorWidth}" />
|
|
<Setter TargetName="SeparatorLine" Property="Margin" Value="{DynamicResource TopNavigationViewItemSeparatorMargin}" />
|
|
<Setter TargetName="SeparatorLine" Property="VerticalAlignment" Value="Center" />
|
|
<Setter TargetName="SeparatorLine" Property="Fill" Value="{DynamicResource TopNavigationViewItemSeparatorForeground}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Settings Panel -->
|
|
<Thickness x:Key="SettingPanelMargin">70,13.5,18,13.5</Thickness>
|
|
|
|
<Thickness x:Key="SettingPanelItemLeftMargin">9,0,0,0</Thickness>
|
|
<Thickness x:Key="SettingPanelItemRightMargin">0,0,9,0</Thickness>
|
|
<Thickness x:Key="SettingPanelItemTopBottomMargin">0,4.5,0,4.5</Thickness>
|
|
|
|
<Thickness x:Key="SettingPanelItemLeftTopBottomMargin">9,4.5,0,4.5</Thickness>
|
|
<Thickness x:Key="SettingPanelItemRightTopBottomMargin">0,4.5,9,4.5</Thickness>
|
|
|
|
<Style x:Key="SettingPanelSeparatorStyle" TargetType="Separator">
|
|
<Setter Property="Margin" Value="-70 13.5 -18 13.5" />
|
|
<Setter Property="Height" Value="1" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="Background" Value="{DynamicResource Color03B}" />
|
|
</Style>
|
|
|
|
<system:Double x:Key="SettingPanelTextBoxMinWidth">180</system:Double>
|
|
<system:Double x:Key="SettingPanelPathTextBoxWidth">240</system:Double>
|
|
<system:Double x:Key="SettingPanelAreaTextBoxMinHeight">150</system:Double>
|
|
|
|
<Style x:Key="SettingPanelTextBlockDescriptionStyle" TargetType="TextBlock">
|
|
<Setter Property="FontSize" Value="12" />
|
|
<Setter Property="Margin" Value="0 2 0 0" />
|
|
<Setter Property="Foreground" Value="{DynamicResource Color04B}" />
|
|
</Style>
|
|
|
|
<!-- Release Notes -->
|
|
<mdplugins:MdXamlPlugins x:Key="MdXamlPlugins">
|
|
<mdhtml:HtmlPluginSetup />
|
|
<mdsvg:SvgPluginSetup />
|
|
<mdagif:AnimatedGifPluginSetup />
|
|
</mdplugins:MdXamlPlugins>
|
|
|
|
<Style x:Key="DocumentStyleGithubLikeLight" TargetType="FlowDocument">
|
|
<Setter Property="FontFamily" Value="Calibri" />
|
|
<Setter Property="TextAlignment" Value="Left" />
|
|
<Setter Property="PagePadding" Value="0" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
<Style.Resources>
|
|
<Style TargetType="Section">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="Blockquote">
|
|
<Setter Property="Padding" Value="10 5" />
|
|
<Setter Property="BorderBrush" Value="#DEDEDE" />
|
|
<Setter Property="BorderThickness" Value="5 0 0 0" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit" TargetType="avalonEdit:TextEditor">
|
|
<Setter Property="Background" Value="#EEEEEE" />
|
|
<Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="Margin" Value="2 0 2 0" />
|
|
<Setter Property="Padding" Value="3" />
|
|
</Style>
|
|
|
|
<Style TargetType="Paragraph">
|
|
<Setter Property="Margin" Value="0 7 0 0" />
|
|
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="Heading1">
|
|
<Setter Property="Margin" Value="0 0 15 0" />
|
|
|
|
<Setter Property="Foreground" Value="#ff000000" />
|
|
<Setter Property="FontSize" Value="28" />
|
|
<Setter Property="FontWeight" Value="UltraBold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Heading2">
|
|
<Setter Property="Margin" Value="0 0 15 0" />
|
|
|
|
<Setter Property="Foreground" Value="#ff000000" />
|
|
<Setter Property="FontSize" Value="21" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Heading3">
|
|
<Setter Property="Margin" Value="0 0 10 0" />
|
|
|
|
<Setter Property="Foreground" Value="#ff000000" />
|
|
<Setter Property="FontSize" Value="17.5" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Heading4">
|
|
<Setter Property="Margin" Value="0 0 5 0" />
|
|
|
|
<Setter Property="Foreground" Value="#ff000000" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="CodeBlock">
|
|
<Setter Property="FontFamily" Value="Courier New" />
|
|
<Setter Property="FontSize" Value="11.9" />
|
|
<Setter Property="Background" Value="#12181F25" />
|
|
<Setter Property="Padding" Value="20 10" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Note">
|
|
<Setter Property="Margin" Value="5 0 5 0" />
|
|
<Setter Property="Padding" Value="10 5" />
|
|
<Setter Property="BorderBrush" Value="#DEDEDE" />
|
|
<Setter Property="BorderThickness" Value="3 3 3 3" />
|
|
<Setter Property="Background" Value="#FAFAFA" />
|
|
</Trigger>
|
|
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="Run">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="CodeSpan">
|
|
<Setter Property="FontFamily" Value="Courier New" />
|
|
<Setter Property="FontSize" Value="11.9" />
|
|
<Setter Property="Background" Value="#12181F25" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
<Style TargetType="Span">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="CodeSpan">
|
|
<Setter Property="FontFamily" Value="Courier New" />
|
|
<Setter Property="FontSize" Value="11.9" />
|
|
<Setter Property="Background" Value="#12181F25" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="Hyperlink">
|
|
<Setter Property="TextDecorations" Value="None" />
|
|
</Style>
|
|
|
|
<Style TargetType="Image">
|
|
<Setter Property="RenderOptions.BitmapScalingMode" Value="NearestNeighbor" />
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="imageright">
|
|
<Setter Property="Margin" Value="20 0 0 0" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<!--
|
|
The Table's style don't seem to support border-collapse.
|
|
By making the ruled line width 0.5 and applying it to cell and table,
|
|
it looks like the ruled lines are not doubled.
|
|
-->
|
|
<Style TargetType="Table">
|
|
<Setter Property="CellSpacing" Value="0" />
|
|
<Setter Property="BorderThickness" Value="0.5" />
|
|
<Setter Property="BorderBrush" Value="#DFE2E5" />
|
|
<Style.Resources>
|
|
<Style TargetType="TableCell">
|
|
<Setter Property="BorderThickness" Value="0.5" />
|
|
<Setter Property="BorderBrush" Value="#DFE2E5" />
|
|
<Setter Property="Padding" Value="13 6" />
|
|
</Style>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style TargetType="TableRowGroup">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="TableHeader">
|
|
<Setter Property="FontWeight" Value="DemiBold" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
<Setter Property="Background" Value="#FFFFFF" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="TableRow">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="EvenTableRow">
|
|
<Setter Property="Background" Value="#F6F8FA" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="BlockUIContainer">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="RuleSingle">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="RuleDouble">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="RuleBold">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="RuleBoldWithSingle">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style x:Key="DocumentStyleGithubLikeDark" TargetType="FlowDocument">
|
|
<Setter Property="FontFamily" Value="Calibri" />
|
|
<Setter Property="TextAlignment" Value="Left" />
|
|
<Setter Property="PagePadding" Value="0" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
|
|
<Style.Resources>
|
|
<Style TargetType="Section">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="Blockquote">
|
|
<Setter Property="Padding" Value="10 5" />
|
|
<Setter Property="BorderBrush" Value="#212121" />
|
|
<Setter Property="BorderThickness" Value="5 0 0 0" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit" TargetType="avalonEdit:TextEditor">
|
|
<Setter Property="Background" Value="#111111" />
|
|
<Setter Property="HorizontalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="Margin" Value="2 0 2 0" />
|
|
<Setter Property="Padding" Value="3" />
|
|
</Style>
|
|
|
|
<Style TargetType="Paragraph">
|
|
<Setter Property="Margin" Value="0 7 0 0" />
|
|
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="Heading1">
|
|
<Setter Property="Margin" Value="0 0 15 0" />
|
|
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
|
<Setter Property="FontSize" Value="28" />
|
|
<Setter Property="FontWeight" Value="UltraBold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Heading2">
|
|
<Setter Property="Margin" Value="0 0 15 0" />
|
|
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
|
<Setter Property="FontSize" Value="21" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Heading3">
|
|
<Setter Property="Margin" Value="0 0 10 0" />
|
|
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
|
<Setter Property="FontSize" Value="17.5" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Heading4">
|
|
<Setter Property="Margin" Value="0 0 5 0" />
|
|
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
|
<Setter Property="FontSize" Value="14" />
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="CodeBlock">
|
|
<Setter Property="FontFamily" Value="Courier New" />
|
|
<Setter Property="FontSize" Value="11.9" />
|
|
<Setter Property="Background" Value="#E0E7DFDA" />
|
|
<Setter Property="Padding" Value="20 10" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="Note">
|
|
<Setter Property="Margin" Value="5 0 5 0" />
|
|
<Setter Property="Padding" Value="10 5" />
|
|
<Setter Property="BorderBrush" Value="#212121" />
|
|
<Setter Property="BorderThickness" Value="3 3 3 3" />
|
|
<Setter Property="Background" Value="#050505" />
|
|
</Trigger>
|
|
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="Run">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="CodeSpan">
|
|
<Setter Property="FontFamily" Value="Courier New" />
|
|
<Setter Property="FontSize" Value="11.9" />
|
|
<Setter Property="Background" Value="#E0E7DFDA" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="Span">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="CodeSpan">
|
|
<Setter Property="FontFamily" Value="Courier New" />
|
|
<Setter Property="FontSize" Value="11.9" />
|
|
<Setter Property="Background" Value="#E0E7DFDA" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="Hyperlink">
|
|
<Setter Property="TextDecorations" Value="None" />
|
|
</Style>
|
|
|
|
<Style TargetType="Image">
|
|
<Setter Property="RenderOptions.BitmapScalingMode" Value="NearestNeighbor" />
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="imageright">
|
|
<Setter Property="Margin" Value="20 0 0 0" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="Table">
|
|
<Setter Property="CellSpacing" Value="0" />
|
|
<Setter Property="BorderThickness" Value="0.5" />
|
|
<Setter Property="BorderBrush" Value="#202020" />
|
|
<Style.Resources>
|
|
<Style TargetType="TableCell">
|
|
<Setter Property="BorderThickness" Value="0.5" />
|
|
<Setter Property="BorderBrush" Value="#202020" />
|
|
<Setter Property="Padding" Value="13 6" />
|
|
</Style>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
<Style TargetType="TableRowGroup">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="TableHeader">
|
|
<Setter Property="FontWeight" Value="Bold" />
|
|
<Setter Property="Background" Value="#000000" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="TableRow">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="EvenTableRow">
|
|
<Setter Property="Background" Value="#090708" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style TargetType="BlockUIContainer">
|
|
<Style.Triggers>
|
|
<Trigger Property="Tag" Value="RuleSingle">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="RuleDouble">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="RuleBold">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
|
|
<Trigger Property="Tag" Value="RuleBoldWithSingle">
|
|
<Setter Property="Margin" Value="0 3" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Style.Resources>
|
|
</Style>
|
|
|
|
</ResourceDictionary> |