mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
5351 lines
373 KiB
XML
5351 lines
373 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:system="clr-namespace:System;assembly=mscorlib"
|
|
xmlns:ui="http://schemas.modernwpf.com/2019">
|
|
|
|
<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>
|
|
|
|
|
|
<Style TargetType="{x:Type ContentControl}">
|
|
<Setter Property="Foreground" Value="{DynamicResource Color05B}" />
|
|
</Style>
|
|
|
|
<!-- Popup Color -->
|
|
<Style x:Key="PageBackgroundColor" TargetType="{x:Type Window}">
|
|
<Setter Property="Background" Value="{DynamicResource Color05B}" />
|
|
<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="1" />
|
|
</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>
|
|
|
|
<!-- Repeat Button -->
|
|
|
|
<!-- Radio Button -->
|
|
<Style x:Key="DefaultRadioButtonStyle" TargetType="RadioButton">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource RadioButtonBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource RadioButtonForeground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrush}" />
|
|
<Setter Property="Padding" Value="8,6,0,0" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="MinWidth" Value="120" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
|
|
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="-7,-3,-7,-3" />
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Border
|
|
x:Name="RootGrid"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
SnapsToDevicePixels="True">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="20" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid Height="32" VerticalAlignment="Top">
|
|
<Ellipse
|
|
x:Name="OuterEllipse"
|
|
Width="20"
|
|
Height="20"
|
|
Fill="{DynamicResource CustomRadioBackground}"
|
|
Stroke="{DynamicResource CustomRadioBorder}"
|
|
StrokeThickness="{DynamicResource RadioButtonBorderThemeThickness}"
|
|
UseLayoutRounding="False" />
|
|
<Ellipse
|
|
x:Name="CheckOuterEllipse"
|
|
Width="20"
|
|
Height="20"
|
|
Fill="{DynamicResource RadioButtonOuterEllipseCheckedFill}"
|
|
Opacity="0"
|
|
Stroke="{DynamicResource RadioButtonOuterEllipseCheckedStroke}"
|
|
StrokeThickness="{DynamicResource RadioButtonBorderThemeThickness}"
|
|
UseLayoutRounding="False" />
|
|
<Ellipse
|
|
x:Name="CheckGlyph"
|
|
Width="12"
|
|
Height="12"
|
|
Fill="{DynamicResource RadioButtonCheckGlyphFill}"
|
|
Opacity="0"
|
|
Stroke="{DynamicResource RadioButtonCheckGlyphStroke}"
|
|
UseLayoutRounding="False" />
|
|
</Grid>
|
|
<ui:ContentPresenterEx
|
|
x:Name="ContentPresenter"
|
|
Grid.Column="1"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Focusable="False"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CheckStates">
|
|
<VisualState x:Name="Checked">
|
|
<Storyboard>
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="CheckGlyph"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="1"
|
|
Duration="0" />
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="OuterEllipse"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="0"
|
|
Duration="0" />
|
|
<DoubleAnimation
|
|
Storyboard.TargetName="CheckOuterEllipse"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="1"
|
|
Duration="0" />
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Unchecked" />
|
|
<VisualState x:Name="Indeterminate" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource RadioButtonForegroundPointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource RadioButtonBackgroundPointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrushPointerOver}" />
|
|
<Setter TargetName="OuterEllipse" Property="Stroke" Value="{DynamicResource HoverCustomRadioBorder}" />
|
|
<Setter TargetName="OuterEllipse" Property="Fill" Value="{DynamicResource HoverCustomRadioBackground}" />
|
|
<Setter TargetName="CheckOuterEllipse" Property="Stroke" Value="{DynamicResource RadioButtonOuterEllipseCheckedStrokePointerOver}" />
|
|
<Setter TargetName="CheckOuterEllipse" Property="Fill" Value="{DynamicResource RadioButtonOuterEllipseCheckedFillPointerOver}" />
|
|
<Setter TargetName="CheckGlyph" Property="Fill" Value="{DynamicResource RadioButtonCheckGlyphFillPointerOver}" />
|
|
<Setter TargetName="CheckGlyph" Property="Stroke" Value="{DynamicResource RadioButtonCheckGlyphStrokePointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource RadioButtonForegroundPressed}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource RadioButtonBackgroundPressed}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrushPressed}" />
|
|
<Setter TargetName="OuterEllipse" Property="Stroke" Value="{DynamicResource PressedCustomRadioBorder}" />
|
|
<Setter TargetName="OuterEllipse" Property="Fill" Value="{DynamicResource PressedCustomRadioBackground}" />
|
|
<Setter TargetName="CheckOuterEllipse" Property="Stroke" Value="{DynamicResource RadioButtonOuterEllipseCheckedStrokePressed}" />
|
|
<Setter TargetName="CheckOuterEllipse" Property="Fill" Value="{DynamicResource RadioButtonOuterEllipseCheckedFillPressed}" />
|
|
<Setter TargetName="CheckGlyph" Property="Fill" Value="{DynamicResource RadioButtonCheckGlyphFillPressed}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
<Setter TargetName="CheckGlyph" Property="Stroke" Value="{DynamicResource RadioButtonCheckGlyphStrokePressed}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource RadioButtonForegroundDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource RadioButtonBackgroundDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource RadioButtonBorderBrushDisabled}" />
|
|
<Setter TargetName="OuterEllipse" Property="Stroke" Value="{DynamicResource RadioButtonOuterEllipseStrokeDisabled}" />
|
|
<Setter TargetName="OuterEllipse" Property="Fill" Value="{DynamicResource RadioButtonOuterEllipseFillDisabled}" />
|
|
<Setter TargetName="CheckOuterEllipse" Property="Stroke" Value="{DynamicResource RadioButtonOuterEllipseCheckedStrokeDisabled}" />
|
|
<Setter TargetName="CheckOuterEllipse" Property="Fill" Value="{DynamicResource RadioButtonOuterEllipseCheckedFillDisabled}" />
|
|
<Setter TargetName="CheckGlyph" Property="Fill" Value="{DynamicResource RadioButtonCheckGlyphFillDisabled}" />
|
|
<Setter TargetName="CheckGlyph" Property="Stroke" Value="{DynamicResource RadioButtonCheckGlyphStrokeDisabled}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultRadioButtonStyle}" TargetType="RadioButton" />
|
|
|
|
<!-- CheckBox -->
|
|
<ui:CornerRadiusFilterConverter x:Key="TopLeftCornerRadiusDoubleValueConverter" Filter="TopLeftValue" />
|
|
<ui:CornerRadiusFilterConverter x:Key="BottomRightCornerRadiusDoubleValueConverter" Filter="BottomRightValue" />
|
|
|
|
<Style x:Key="DefaultCheckBoxStyle" TargetType="CheckBox">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource CheckBoxBackgroundUnchecked}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource CheckBoxForegroundUnchecked}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushUnchecked}" />
|
|
<Setter Property="Padding" Value="8,0,0,0" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="MinWidth" Value="32" />
|
|
<Setter Property="MinHeight" Value="32" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
|
|
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="-7,-3,-7,-3" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="CheckBox">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="CheckMark">M 17.939453 5.439453 L 7.5 15.888672 L 2.060547 10.439453 L 2.939453 9.560547 L 7.5 14.111328 L 17.060547 4.560547 Z</StreamGeometry>
|
|
<StreamGeometry x:Key="CheckboxIndeterminate">M 15 5 L 15 15 L 5 15 L 5 5 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
<Border
|
|
x:Name="RootGrid"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
SnapsToDevicePixels="True">
|
|
<Grid VerticalAlignment="Center">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="20" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid VerticalAlignment="Top">
|
|
<Rectangle
|
|
x:Name="NormalRectangle"
|
|
Width="20"
|
|
Height="20"
|
|
Fill="{DynamicResource CheckBoxCheckBackgroundFillUnchecked}"
|
|
RadiusX="{TemplateBinding ui:ControlHelper.CornerRadius,
|
|
Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
|
|
RadiusY="{TemplateBinding ui:ControlHelper.CornerRadius,
|
|
Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}"
|
|
Stroke="{DynamicResource CheckBoxCheckBackgroundStrokeUnchecked}"
|
|
StrokeThickness="{DynamicResource CheckBoxBorderThemeThickness}"
|
|
UseLayoutRounding="False" />
|
|
<ui:FontIconFallback
|
|
x:Name="CheckGlyph"
|
|
Data="{StaticResource CheckMark}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="16"
|
|
Foreground="{DynamicResource CheckBoxCheckGlyphForegroundUnchecked}"
|
|
Opacity="0" />
|
|
</Grid>
|
|
<ui:ContentPresenterEx
|
|
x:Name="ContentPresenter"
|
|
Grid.Column="1"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Focusable="False"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<!-- UncheckedNormal -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="False" />
|
|
<Condition Property="IsMouseOver" Value="False" />
|
|
<Condition Property="IsPressed" Value="False" />
|
|
<Condition Property="IsEnabled" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundUnchecked}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundUnchecked}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushUnchecked}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeUnchecked}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillUnchecked}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundUnchecked}" />
|
|
</MultiTrigger>
|
|
<!-- UncheckedPointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="False" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundUncheckedPointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundUncheckedPointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushUncheckedPointerOver}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeUncheckedPointerOver}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillUncheckedPointerOver}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundUncheckedPointerOver}" />
|
|
</MultiTrigger>
|
|
<!-- UncheckedPressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="False" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundUncheckedPressed}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundUncheckedPressed}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushUncheckedPressed}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeUncheckedPressed}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillUncheckedPressed}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundUncheckedPressed}" />
|
|
</MultiTrigger>
|
|
<!-- UncheckedDisabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="False" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundUncheckedDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundUncheckedDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushUncheckedDisabled}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeUncheckedDisabled}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillUncheckedDisabled}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundUncheckedDisabled}" />
|
|
</MultiTrigger>
|
|
<!-- CheckedNormal -->
|
|
<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="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundChecked}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundChecked}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushChecked}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeChecked}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillChecked}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundChecked}" />
|
|
<Setter TargetName="NormalRectangle" Property="StrokeThickness" Value="{DynamicResource CheckBoxCheckedStrokeThickness}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
<!-- CheckedPointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="True" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundCheckedPointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundCheckedPointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushCheckedPointerOver}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeCheckedPointerOver}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillCheckedPointerOver}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundCheckedPointerOver}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
<!-- CheckedPressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="True" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundCheckedPressed}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundCheckedPressed}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushCheckedPressed}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeCheckedPressed}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillCheckedPressed}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundCheckedPressed}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
<!-- CheckedDisabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="True" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundCheckedDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundCheckedDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushCheckedDisabled}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeCheckedDisabled}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillCheckedDisabled}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundCheckedDisabled}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
<!-- IndeterminateNormal -->
|
|
<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="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundIndeterminate}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundIndeterminate}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushIndeterminate}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeIndeterminate}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillIndeterminate}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundIndeterminate}" />
|
|
<Setter TargetName="CheckGlyph" Property="Data" Value="{StaticResource CheckboxIndeterminate}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
<!-- IndeterminatePointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="{x:Null}" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundIndeterminatePointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundIndeterminatePointerOver}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushIndeterminatePointerOver}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeIndeterminatePointerOver}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillIndeterminatePointerOver}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundIndeterminatePointerOver}" />
|
|
<Setter TargetName="CheckGlyph" Property="Data" Value="{StaticResource CheckboxIndeterminate}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
<!-- IndeterminatePressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="{x:Null}" />
|
|
<Condition Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundIndeterminatePressed}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundIndeterminatePressed}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushIndeterminatePressed}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeIndeterminatePressed}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillIndeterminatePressed}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundIndeterminatePressed}" />
|
|
<Setter TargetName="CheckGlyph" Property="Data" Value="{StaticResource CheckboxIndeterminate}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
<!-- IndeterminateDisabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsChecked" Value="{x:Null}" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource CheckBoxForegroundIndeterminateDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource CheckBoxBackgroundIndeterminateDisabled}" />
|
|
<Setter TargetName="RootGrid" Property="BorderBrush" Value="{DynamicResource CheckBoxBorderBrushIndeterminateDisabled}" />
|
|
<Setter TargetName="NormalRectangle" Property="Stroke" Value="{DynamicResource CheckBoxCheckBackgroundStrokeIndeterminateDisabled}" />
|
|
<Setter TargetName="NormalRectangle" Property="Fill" Value="{DynamicResource CheckBoxCheckBackgroundFillIndeterminateDisabled}" />
|
|
<Setter TargetName="CheckGlyph" Property="Foreground" Value="{DynamicResource CheckBoxCheckGlyphForegroundIndeterminateDisabled}" />
|
|
<Setter TargetName="CheckGlyph" Property="Data" Value="{StaticResource CheckboxIndeterminate}" />
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultCheckBoxStyle}" TargetType="CheckBox" />
|
|
|
|
<Style
|
|
x:Key="DataGridCheckBoxStyle"
|
|
BasedOn="{StaticResource DefaultCheckBoxStyle}"
|
|
TargetType="CheckBox">
|
|
<Setter Property="MinWidth" Value="0" />
|
|
<Setter Property="MinHeight" Value="0" />
|
|
<Setter Property="Margin" Value="12,0" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="DataGridReadOnlyCheckBoxStyle"
|
|
BasedOn="{StaticResource DataGridCheckBoxStyle}"
|
|
TargetType="CheckBox">
|
|
<Setter Property="IsHitTestVisible" Value="False" />
|
|
<Setter Property="Focusable" Value="False" />
|
|
</Style>
|
|
|
|
|
|
<!-- Combo Box -->
|
|
<Thickness x:Key="ComboBoxTopHeaderMargin">0,0,0,4</Thickness>
|
|
<Thickness x:Key="ComboBoxPadding">12,6,0,6</Thickness>
|
|
<Thickness x:Key="ComboBoxEditableTextPadding">11,5,32,6</Thickness>
|
|
<system:Double x:Key="ComboBoxMinHeight">32</system:Double>
|
|
|
|
<Style x:Key="DefaultComboBoxItemStyle" TargetType="ComboBoxItem">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackground}" />
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="Local" />
|
|
<Setter Property="Padding" Value="{DynamicResource ComboBoxItemThemePadding}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="True" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBoxItem">
|
|
<Border
|
|
x:Name="LayoutRoot"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
SnapsToDevicePixels="True">
|
|
<ContentPresenter
|
|
x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="False" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundPointerOver}" />
|
|
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundPointerOver}" />
|
|
</MultiTrigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="False" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundDisabled}" />
|
|
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushDisabled}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundDisabled}" />
|
|
</MultiTrigger>
|
|
<!-- Selected -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True" />
|
|
<Condition Property="IsFocused" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelected}" />
|
|
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelected}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelected}" />
|
|
</MultiTrigger>
|
|
<!-- SelectedUnfocused -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True" />
|
|
<Condition Property="IsFocused" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedUnfocused}" />
|
|
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedUnfocused}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedUnfocused}" />
|
|
</MultiTrigger>
|
|
<!-- SelectedDisabled -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True" />
|
|
<Condition Property="IsEnabled" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedDisabled}" />
|
|
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedDisabled}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedDisabled}" />
|
|
</MultiTrigger>
|
|
<!-- SelectedPointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsSelected" Value="True" />
|
|
<Condition Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedPointerOver}" />
|
|
<Setter TargetName="LayoutRoot" Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedPointerOver}" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultComboBoxItemStyle}" TargetType="ComboBoxItem" />
|
|
|
|
<Style x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
|
|
<Setter Property="OverridesDefaultStyle" Value="true" />
|
|
<Setter Property="IsTabStop" Value="false" />
|
|
<Setter Property="Focusable" Value="false" />
|
|
<Setter Property="ClickMode" Value="Release" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Grid Background="{TemplateBinding Background}" SnapsToDevicePixels="True" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="ComboBoxTextBoxStyle"
|
|
BasedOn="{StaticResource DefaultTextBoxStyle}"
|
|
TargetType="TextBox">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TextBox">
|
|
<Grid SnapsToDevicePixels="True">
|
|
<Border
|
|
x:Name="BorderElement"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
|
|
<ScrollViewer
|
|
x:Name="PART_ContentHost"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
IsTabStop="False"
|
|
Style="{DynamicResource TextControlContentHostStyle}"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" />
|
|
<TextBlock
|
|
x:Name="PlaceholderTextContentPresenter"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
Foreground="{DynamicResource TextControlPlaceholderForeground}"
|
|
IsHitTestVisible="False"
|
|
Text="{TemplateBinding ui:ControlHelper.PlaceholderText}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
TextWrapping="{TemplateBinding TextWrapping}"
|
|
Visibility="Collapsed" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="BorderElement" Property="Background" Value="{DynamicResource TextControlBackgroundDisabled}" />
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushDisabled}" />
|
|
<Setter TargetName="PART_ContentHost" Property="Foreground" Value="{DynamicResource TextControlForegroundDisabled}" />
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundDisabled}" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="BorderElement" Property="Background" Value="{DynamicResource TextControlBackgroundPointerOver}" />
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushPointerOver}" />
|
|
<Setter TargetName="PART_ContentHost" Property="Foreground" Value="{DynamicResource TextControlForegroundPointerOver}" />
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelectionActive" Value="True">
|
|
<Setter TargetName="BorderElement" Property="Background" Value="{DynamicResource TextControlBackgroundFocused}" />
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushFocused}" />
|
|
<Setter TargetName="BorderElement" Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThicknessFocused}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundFocused}" />
|
|
<Setter Property="CaretBrush" Value="{DynamicResource TextControlForegroundFocused}" />
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundFocused}" />
|
|
</Trigger>
|
|
<Trigger Property="Text" Value="">
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="DefaultComboBoxStyle" TargetType="ComboBox">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Padding" Value="{DynamicResource ComboBoxPadding}" />
|
|
<Setter Property="MaxDropDownHeight" Value="504" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource ComboBoxBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource ComboBoxBorderThemeThickness}" />
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="Once" />
|
|
<Setter Property="ui:ComboBoxHelper.TextBoxStyle" Value="{StaticResource ComboBoxTextBoxStyle}" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="true" />
|
|
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="ui:ControlHelper.PlaceholderForeground" Value="{DynamicResource ComboBoxPlaceHolderForeground}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource IsApplicationFocusVisualKindReveal}" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:ComboBoxHelper.KeepInteriorCornersSquare" Value="True" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource TextControlValidationErrorTemplate}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBox">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="ChevronDown">M 18.935547 4.560547 L 19.814453 5.439453 L 10 15.253906 L 0.185547 5.439453 L 1.064453 4.560547 L 10 13.496094 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
|
|
<Grid x:Name="LayoutRoot" SnapsToDevicePixels="True">
|
|
<Grid.Resources>
|
|
<Storyboard x:Key="OverlayOpeningAnimation">
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Shdw" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.0" />
|
|
<SplineDoubleKeyFrame
|
|
KeySpline="0.1,0.9 0.2,1.0"
|
|
KeyTime="0:0:0.383"
|
|
Value="1.0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</Grid.Resources>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="32" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ui:ContentPresenterEx
|
|
x:Name="HeaderContentPresenter"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="{DynamicResource ComboBoxTopHeaderMargin}"
|
|
VerticalAlignment="Top"
|
|
Content="{TemplateBinding ui:ControlHelper.Header}"
|
|
ContentTemplate="{TemplateBinding ui:ControlHelper.HeaderTemplate}"
|
|
FlowDirection="{TemplateBinding FlowDirection}"
|
|
FontWeight="{DynamicResource ComboBoxHeaderThemeFontWeight}"
|
|
Foreground="{DynamicResource ComboBoxHeaderForeground}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextWrapping="Wrap"
|
|
Visibility="{TemplateBinding ui:ControlHelper.HeaderVisibility}" />
|
|
<Border
|
|
x:Name="OutLine"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
BorderBrush="{DynamicResource CustomComboOutline}"
|
|
BorderThickness="{DynamicResource CustomComboOutlineThickness}"
|
|
CornerRadius="4">
|
|
<Border
|
|
x:Name="Background"
|
|
MinWidth="{DynamicResource ComboBoxThemeMinWidth}"
|
|
ui:ValidationHelper.IsTemplateValidationAdornerSite="True"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{DynamicResource CustomComboInline}"
|
|
BorderThickness="{DynamicResource CustomComboInlineThickness}"
|
|
CornerRadius="4" />
|
|
</Border>
|
|
<Border
|
|
x:Name="HighlightBackground"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Background="{DynamicResource ComboBoxBackgroundUnfocused}"
|
|
BorderBrush="{DynamicResource ComboBoxBackgroundBorderBrushUnfocused}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
Opacity="0" />
|
|
<ContentPresenter
|
|
x:Name="ContentPresenter"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding SelectionBoxItem}"
|
|
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
|
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
<TextBlock
|
|
x:Name="PlaceholderTextBlock"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{TemplateBinding Padding}"
|
|
Padding="0,0,32,0"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Foreground="{TemplateBinding ui:ControlHelper.PlaceholderForeground}"
|
|
IsHitTestVisible="False"
|
|
Text="{TemplateBinding ui:ControlHelper.PlaceholderText}"
|
|
Visibility="Collapsed" />
|
|
<ToggleButton
|
|
x:Name="ToggleButton"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Background="Transparent"
|
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Style="{StaticResource ComboBoxToggleButton}" />
|
|
<TextBox
|
|
x:Name="PART_EditableTextBox"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="0,0,0,0"
|
|
Padding="{DynamicResource ComboBoxEditableTextPadding}"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
ui:ControlHelper.CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
ui:ControlHelper.PlaceholderForeground="{TemplateBinding ui:ControlHelper.PlaceholderForeground}"
|
|
ui:ControlHelper.PlaceholderText="{TemplateBinding ui:ControlHelper.PlaceholderText}"
|
|
AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}"
|
|
BorderBrush="Transparent"
|
|
IsReadOnly="{TemplateBinding IsReadOnly}"
|
|
Style="{TemplateBinding ui:ComboBoxHelper.TextBoxStyle}"
|
|
Visibility="Collapsed" />
|
|
<ToggleButton
|
|
x:Name="DropDownOverlay"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="30"
|
|
Margin="0,1,1,1"
|
|
HorizontalAlignment="Right"
|
|
Background="Transparent"
|
|
IsChecked="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Style="{StaticResource ComboBoxToggleButton}"
|
|
Visibility="Collapsed" />
|
|
<ui:FontIconFallback
|
|
x:Name="DropDownGlyph"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
MinHeight="{DynamicResource ComboBoxMinHeight}"
|
|
Margin="0,0,10,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Data="{StaticResource ChevronDown}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="9"
|
|
Foreground="{DynamicResource ComboBoxDropDownGlyphForeground}"
|
|
IsHitTestVisible="False" />
|
|
<ContentPresenter
|
|
x:Name="DescriptionPresenter"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Content="{TemplateBinding ui:ControlHelper.Description}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{DynamicResource SystemControlDescriptionTextForegroundBrush}"
|
|
Visibility="{TemplateBinding ui:ControlHelper.DescriptionVisibility}" />
|
|
<Popup
|
|
x:Name="PART_Popup"
|
|
AllowsTransparency="True"
|
|
IsOpen="{Binding IsDropDownOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Placement="Bottom"
|
|
PlacementTarget="{Binding ElementName=Background}"
|
|
PopupAnimation="None">
|
|
<Popup.PlacementRectangle>
|
|
<MultiBinding>
|
|
<MultiBinding.Converter>
|
|
<ui:PlacementRectangleConverter Margin="-1,1,0,1" />
|
|
</MultiBinding.Converter>
|
|
<Binding ElementName="Background" Path="ActualWidth" />
|
|
<Binding ElementName="Background" Path="ActualHeight" />
|
|
</MultiBinding>
|
|
</Popup.PlacementRectangle>
|
|
<ui:ThemeShadowChrome
|
|
x:Name="Shdw"
|
|
MinWidth="{Binding ActualWidth, ElementName=LayoutRoot}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
ui:OpeningAnimationHelper.Storyboard="{StaticResource OverlayOpeningAnimation}"
|
|
CornerRadius="{Binding ElementName=PopupBorder, Path=CornerRadius}"
|
|
IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">
|
|
<Border
|
|
x:Name="PopupBorder"
|
|
HorizontalAlignment="Stretch"
|
|
Background="{DynamicResource PopUpBorderBG}"
|
|
CornerRadius="{DynamicResource OverlayCornerRadius}">
|
|
<Border
|
|
Padding="{DynamicResource ComboBoxDropdownBorderPadding}"
|
|
BorderBrush="{DynamicResource ComboBoxDropDownBorderBrush}"
|
|
BorderThickness="{DynamicResource ComboBoxDropdownBorderThickness}"
|
|
CornerRadius="{Binding ElementName=PopupBorder, Path=CornerRadius}">
|
|
<ScrollViewer
|
|
x:Name="ScrollViewer"
|
|
Foreground="{DynamicResource ComboBoxDropDownForeground}"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
|
<ItemsPresenter
|
|
Margin="{DynamicResource ComboBoxDropdownContentMargin}"
|
|
KeyboardNavigation.DirectionalNavigation="Contained"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ScrollViewer>
|
|
</Border>
|
|
</Border>
|
|
</ui:ThemeShadowChrome>
|
|
</Popup>
|
|
</Grid>
|
|
|
|
<ControlTemplate.Triggers>
|
|
<!-- PointerOver -->
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource CustomComboHoverBG}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxForegroundPointerOver}" />
|
|
<Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundPointerOver}" />
|
|
</Trigger>
|
|
<!-- Pressed -->
|
|
<Trigger SourceName="ToggleButton" Property="IsPressed" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource CustomComboPressedBG}" />
|
|
<Setter TargetName="Background" Property="BorderThickness" Value="0" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrushPressed}" />
|
|
<Setter TargetName="OutLine" Property="BorderBrush" Value="{DynamicResource CustomComboPressedOutLine}" />
|
|
<Setter TargetName="OutLine" Property="BorderThickness" Value="{DynamicResource PressedCustomComboOutlineThickness}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource CustomComboPressedText}" />
|
|
<Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundPressed}" />
|
|
</Trigger>
|
|
<!-- Disabled -->
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource CustomComboDisabledBG}" />
|
|
<Setter TargetName="Background" Property="BorderThickness" Value="0" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrushPressed}" />
|
|
<Setter TargetName="OutLine" Property="BorderBrush" Value="{DynamicResource CustomComboDisabledOutLine}" />
|
|
<Setter TargetName="OutLine" Property="BorderThickness" Value="{DynamicResource DisabledCustomComboOutlineThickness}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource CustomComboDisabledText}" />
|
|
<Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundPressed}" />
|
|
</Trigger>
|
|
|
|
<!-- Focused -->
|
|
<Trigger Property="ui:FocusVisualHelper.ShowFocusVisual" Value="True">
|
|
<Setter TargetName="HighlightBackground" Property="Opacity" Value="1" />
|
|
<Setter TargetName="HighlightBackground" Property="Background" Value="{DynamicResource CustomComboHighlightBG}" />
|
|
<Setter TargetName="HighlightBackground" Property="BorderBrush" Value="{DynamicResource ComboBoxBackgroundBorderBrushFocused}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxForegroundFocused}" />
|
|
<Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundFocused}" />
|
|
<Setter TargetName="DropDownGlyph" Property="Foreground" Value="{DynamicResource ComboBoxDropDownGlyphForegroundFocused}" />
|
|
</Trigger>
|
|
<!-- FocusedPressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="ui:FocusVisualHelper.ShowFocusVisual" Value="True" />
|
|
<Condition SourceName="ToggleButton" Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="HighlightBackground" Property="Opacity" Value="1" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxForegroundFocusedPressed}" />
|
|
<Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundFocusedPressed}" />
|
|
<Setter TargetName="DropDownGlyph" Property="Foreground" Value="{DynamicResource ComboBoxDropDownGlyphForegroundFocusedPressed}" />
|
|
</MultiTrigger>
|
|
<!-- FocusedDropDown -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="ui:FocusVisualHelper.ShowFocusVisual" Value="True" />
|
|
<Condition Property="IsDropDownOpen" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="PopupBorder" Property="Visibility" Value="Visible" />
|
|
</MultiTrigger>
|
|
|
|
<Trigger Property="IsEditable" Value="true">
|
|
<Setter TargetName="ContentPresenter" Property="Visibility" Value="Collapsed" />
|
|
<Setter TargetName="ToggleButton" Property="Visibility" Value="Collapsed" />
|
|
<Setter TargetName="PART_EditableTextBox" Property="Visibility" Value="Visible" />
|
|
<Setter TargetName="DropDownOverlay" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsEditable" Value="False" />
|
|
<Condition Property="SelectedIndex" Value="-1" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="PlaceholderTextBlock" Property="Visibility" Value="Visible" />
|
|
</MultiTrigger>
|
|
|
|
<!-- TextBoxFocused -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition SourceName="PART_EditableTextBox" Property="IsSelectionActive" Value="True" />
|
|
<Condition SourceName="DropDownOverlay" Property="IsMouseOver" Value="False" />
|
|
<Condition SourceName="DropDownOverlay" Property="IsPressed" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="DropDownGlyph" Property="Foreground" Value="{DynamicResource ComboBoxEditableDropDownGlyphForeground}" />
|
|
<Setter TargetName="DropDownOverlay" Property="Margin" Value="0,2,2,2" />
|
|
</MultiTrigger>
|
|
<!-- TextBoxFocusedOverlayPointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition SourceName="PART_EditableTextBox" Property="IsSelectionActive" Value="True" />
|
|
<Condition SourceName="DropDownOverlay" Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="DropDownGlyph" Property="Foreground" Value="{DynamicResource ComboBoxEditableDropDownGlyphForeground}" />
|
|
<Setter TargetName="DropDownOverlay" Property="Background" Value="{DynamicResource ComboBoxFocusedDropDownBackgroundPointerOver}" />
|
|
<Setter TargetName="DropDownOverlay" Property="Margin" Value="0,2,2,2" />
|
|
</MultiTrigger>
|
|
<!-- TextBoxFocusedOverlayPressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition SourceName="PART_EditableTextBox" Property="IsSelectionActive" Value="True" />
|
|
<Condition SourceName="DropDownOverlay" Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="DropDownGlyph" Property="Foreground" Value="{DynamicResource ComboBoxEditableDropDownGlyphForeground}" />
|
|
<Setter TargetName="DropDownOverlay" Property="Background" Value="{DynamicResource ComboBoxFocusedDropDownBackgroundPointerPressed}" />
|
|
<Setter TargetName="DropDownOverlay" Property="Margin" Value="0,2,2,2" />
|
|
</MultiTrigger>
|
|
<!-- TextBoxOverlayPointerOver -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition SourceName="PART_EditableTextBox" Property="IsSelectionActive" Value="False" />
|
|
<Condition SourceName="DropDownOverlay" Property="IsMouseOver" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="DropDownOverlay" Property="Background" Value="{DynamicResource ComboBoxDropDownBackgroundPointerOver}" />
|
|
</MultiTrigger>
|
|
<!-- TextBoxOverlayPressed -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition SourceName="PART_EditableTextBox" Property="IsSelectionActive" Value="False" />
|
|
<Condition SourceName="DropDownOverlay" Property="IsPressed" Value="True" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="DropDownOverlay" Property="Background" Value="{DynamicResource ComboBoxDropDownBackgroundPointerPressed}" />
|
|
</MultiTrigger>
|
|
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsGrouping" Value="true" />
|
|
<Condition Property="VirtualizingPanel.IsVirtualizingWhenGrouping" Value="false" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="ScrollViewer.CanContentScroll" Value="false" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultComboBoxStyle}" TargetType="ComboBox" />
|
|
|
|
<Style
|
|
x:Key="DataGridComboBoxStyle"
|
|
BasedOn="{StaticResource DefaultComboBoxStyle}"
|
|
TargetType="ComboBox">
|
|
<Setter Property="Padding" Value="12,0,0,0" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="0" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource DataGridTextControlValidationErrorTemplate}" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="DataGridTextBlockComboBoxStyle"
|
|
BasedOn="{StaticResource DefaultComboBoxStyle}"
|
|
TargetType="ComboBox">
|
|
<Setter Property="Padding" Value="12,0,0,0" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ComboBox">
|
|
<ContentPresenter
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding SelectionBoxItem}"
|
|
ContentStringFormat="{TemplateBinding SelectionBoxItemStringFormat}"
|
|
ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ItemTemplateSelector}"
|
|
IsHitTestVisible="false"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<!-- Text Box -->
|
|
<Thickness x:Key="TextBoxTopHeaderMargin">0,0,0,4</Thickness>
|
|
<ui:CornerRadiusFilterConverter x:Key="RightCornerRadiusFilterConverter" Filter="Right" />
|
|
<Style x:Key="DefaultTextBoxStyle" TargetType="TextBox">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource TextControlBorderBrush}" />
|
|
<Setter Property="SelectionBrush" Value="{DynamicResource TextControlSelectionHighlightColor}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden" />
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
|
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
|
|
<Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst" />
|
|
<Setter Property="VerticalContentAlignment" Value="Top" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
|
<Setter Property="MinHeight" Value="{DynamicResource TextControlThemeMinHeight}" />
|
|
<Setter Property="MinWidth" Value="{DynamicResource TextControlThemeMinWidth}" />
|
|
<Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="KeyboardNavigation.TabNavigation" Value="None" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="AllowDrop" Value="true" />
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
<Setter Property="ContextMenu" Value="{DynamicResource TextControlContextMenu}" />
|
|
<Setter Property="ui:TextContextMenu.UsingTextContextMenu" Value="True" />
|
|
<Setter Property="ui:TextBoxHelper.IsEnabled" Value="True" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource TextControlValidationErrorTemplate}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TextBox">
|
|
<ControlTemplate.Resources>
|
|
<Style x:Key="DeleteButtonStyle" TargetType="Button">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="Cancel">M 10.888672 10 L 17.626953 16.748047 L 16.748047 17.626953 L 10 10.888672 L 3.251953 17.626953 L 2.373047 16.748047 L 9.111328 10 L 2.373047 3.251953 L 3.251953 2.373047 L 10 9.111328 L 16.748047 2.373047 L 17.626953 3.251953 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
<Border
|
|
x:Name="ButtonLayoutGrid"
|
|
Background="{DynamicResource TextControlButtonBackground}"
|
|
BorderBrush="{DynamicResource TextControlButtonBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
|
<ui:FontIconFallback
|
|
x:Name="GlyphElement"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="{StaticResource Cancel}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="12"
|
|
FontStyle="Normal"
|
|
Foreground="{DynamicResource TextControlButtonForeground}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="ButtonLayoutGrid" Property="Background" Value="{DynamicResource TextControlButtonBackgroundPointerOver}" />
|
|
<Setter TargetName="ButtonLayoutGrid" Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPointerOver}" />
|
|
<Setter TargetName="GlyphElement" Property="Foreground" Value="{DynamicResource TextControlButtonForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="ButtonLayoutGrid" Property="Background" Value="{DynamicResource TextControlButtonBackgroundPressed}" />
|
|
<Setter TargetName="ButtonLayoutGrid" Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPressed}" />
|
|
<Setter TargetName="GlyphElement" Property="Foreground" Value="{DynamicResource TextControlButtonForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="ButtonLayoutGrid" Property="Opacity" Value="0" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ControlTemplate.Resources>
|
|
<Grid SnapsToDevicePixels="True">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:ContentPresenterEx
|
|
x:Name="HeaderContentPresenter"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="{DynamicResource TextBoxTopHeaderMargin}"
|
|
VerticalAlignment="Top"
|
|
Content="{TemplateBinding ui:ControlHelper.Header}"
|
|
ContentTemplate="{TemplateBinding ui:ControlHelper.HeaderTemplate}"
|
|
FontWeight="Normal"
|
|
Foreground="{DynamicResource TextControlHeaderForeground}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextWrapping="Wrap"
|
|
Visibility="{TemplateBinding ui:ControlHelper.HeaderVisibility}" />
|
|
<Border
|
|
Grid.Row="1"
|
|
Grid.RowSpan="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Background="{DynamicResource CustomTextBoxBG}"
|
|
BorderBrush="{DynamicResource CustomTextBoxOutline}"
|
|
BorderThickness="{DynamicResource CustomTextBoxOutlineThickness}"
|
|
CornerRadius="4">
|
|
<Border
|
|
x:Name="BorderElement"
|
|
MinWidth="{TemplateBinding MinWidth}"
|
|
MinHeight="{TemplateBinding MinHeight}"
|
|
ui:ValidationHelper.IsTemplateValidationAdornerSite="True"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{DynamicResource CustomTextBoxInline}"
|
|
BorderThickness="{DynamicResource CustomTextBoxInlineThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
|
|
</Border>
|
|
<ScrollViewer
|
|
x:Name="PART_ContentHost"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Focusable="False"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
IsTabStop="False"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
Style="{DynamicResource TextControlContentHostStyle}"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" />
|
|
<TextBlock
|
|
x:Name="PlaceholderTextContentPresenter"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
Foreground="{TemplateBinding ui:ControlHelper.PlaceholderForeground}"
|
|
IsHitTestVisible="False"
|
|
Text="{TemplateBinding ui:ControlHelper.PlaceholderText}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
TextWrapping="{TemplateBinding TextWrapping}" />
|
|
<Button
|
|
x:Name="DeleteButton"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
MinWidth="34"
|
|
Padding="{DynamicResource HelperButtonThemePadding}"
|
|
VerticalAlignment="Stretch"
|
|
ui:ControlHelper.CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius,
|
|
Converter={StaticResource RightCornerRadiusFilterConverter}}"
|
|
ui:TextBoxHelper.IsDeleteButton="True"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Focusable="False"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DeleteButtonStyle}"
|
|
Visibility="Collapsed" />
|
|
<ContentPresenter
|
|
x:Name="DescriptionPresenter"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Content="{TemplateBinding ui:ControlHelper.Description}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{DynamicResource SystemControlDescriptionTextForegroundBrush}"
|
|
Visibility="{TemplateBinding ui:ControlHelper.DescriptionVisibility}" />
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="ButtonStates">
|
|
<VisualState x:Name="ButtonVisible">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="ButtonCollapsed" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="ui:ControlHelper.PlaceholderForeground" Value="{x:Null}">
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}" />
|
|
</Trigger>
|
|
<Trigger Property="ui:TextBoxHelper.HasText" Value="True">
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource TextControlHeaderForegroundDisabled}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundDisabled}" />
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushDisabled}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundDisabled}" />
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundDisabled}" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushPointerOver}" />
|
|
<Setter Property="Background" Value="{DynamicResource CustomTextBoxHoverBG}" />
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundPointerOver}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelectionActive" Value="true">
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundFocused}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundFocused}" />
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushFocused}" />
|
|
<Setter TargetName="BorderElement" Property="BorderThickness" Value="0,0,0,2" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundFocused}" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsKeyboardFocused" Value="True" />
|
|
<Condition Property="ui:TextBoxHelper.HasText" Value="True" />
|
|
<Condition Property="IsReadOnly" Value="False" />
|
|
<Condition Property="AcceptsReturn" Value="False" />
|
|
<Condition Property="TextWrapping" Value="NoWrap" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="ui:TextBoxHelper.IsDeleteButtonVisible" Value="True" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultTextBoxStyle}" TargetType="TextBox">
|
|
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultPasswordBoxStyle}" TargetType="PasswordBox">
|
|
<Setter Property="ContextMenu" Value="{StaticResource TextBoxContextMenu}" />
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="DataGridTextBoxStyle"
|
|
BasedOn="{StaticResource DefaultTextBoxStyle}"
|
|
TargetType="TextBox">
|
|
<Setter Property="MinWidth" Value="0" />
|
|
<Setter Property="Padding" Value="11,0,6,0" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="0" />
|
|
<Setter Property="Validation.ErrorTemplate" Value="{DynamicResource DataGridTextControlValidationErrorTemplate}" />
|
|
</Style>
|
|
|
|
<!-- Button -->
|
|
<Thickness x:Key="ButtonPadding">8,5,8,6</Thickness>
|
|
<Style x:Key="DefaultButtonStyle" TargetType="Button">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource ButtonBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource ButtonForeground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource ButtonBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource ButtonBorderThemeThickness}" />
|
|
<Setter Property="Padding" Value="{StaticResource 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="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
|
|
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="-3" />
|
|
<Setter Property="ui:ControlHelper.CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Border
|
|
x:Name="Background"
|
|
Background="{DynamicResource ButtonBackgroundColor}"
|
|
BorderBrush="{DynamicResource ButtonOutBorder}"
|
|
BorderThickness="{DynamicResource CustomButtonOutBorderThickness}"
|
|
CornerRadius="4"
|
|
SnapsToDevicePixels="True">
|
|
<Border
|
|
x:Name="Border"
|
|
Padding="{TemplateBinding Padding}"
|
|
BorderBrush="{DynamicResource ButtonInsideBorder}"
|
|
BorderThickness="{DynamicResource CustomButtonInsideBorderThickness}"
|
|
CornerRadius="4"
|
|
SnapsToDevicePixels="True">
|
|
<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 ButtonMouseOver}" />
|
|
<Setter TargetName="Background" Property="BorderThickness" Value="{DynamicResource CustomButtonOutBorderThickness}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ButtonOutBorder}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonInsideBorder}" />
|
|
<Setter TargetName="Border" Property="BorderThickness" Value="{DynamicResource CustomButtonInsideBorderThickness}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonMousePressed}" />
|
|
<Setter TargetName="Background" Property="BorderThickness" Value="{DynamicResource PressedCustomButtonOutBorderThickness}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ButtonMousePressedInsideBorder}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonInsideMouseOverBorder}" />
|
|
<Setter TargetName="Border" Property="BorderThickness" Value="{DynamicResource PressedCustomButtonInsideBorderThickness}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonMousePressedText}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource ButtonBackgroundDisabledColor}" />
|
|
<Setter TargetName="Background" Property="BorderThickness" Value="{DynamicResource DisabledCustomButtonOutBorderThickness}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ButtonOutBorder}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource ButtonInsideBorderDisabled}" />
|
|
<Setter TargetName="Border" Property="BorderThickness" Value="{DynamicResource DisabledCustomButtonInsideBorderThickness}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ButtonDisabledText}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultButtonStyle}" TargetType="Button" />
|
|
|
|
|
|
<!-- - Custom Toggle Switch from modern wpf for left label -->
|
|
<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}" />
|
|
<Setter Property="HorizontalAlignment" Value="Center" />
|
|
<Setter Property="VerticalAlignment" Value="Center" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="FocusVisualMargin" Value="5" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<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
|
|
Width="Auto"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
|
SnapsToDevicePixels="True">
|
|
<VisualStateManager.CustomVisualStateManager>
|
|
<ui:SimpleVisualStateManager />
|
|
</VisualStateManager.CustomVisualStateManager>
|
|
|
|
<Grid HorizontalAlignment="Right">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<ui:ContentPresenterEx
|
|
x:Name="HeaderContentPresenter"
|
|
Grid.Row="0"
|
|
Margin="{DynamicResource ToggleSwitchTopHeaderMargin}"
|
|
VerticalAlignment="Top"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
IsHitTestVisible="False"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{DynamicResource ToggleSwitchHeaderForeground}"
|
|
TextWrapping="Wrap"
|
|
Visibility="Collapsed" />
|
|
<Grid
|
|
Grid.Row="1"
|
|
MinWidth="10"
|
|
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 Width="12" MaxWidth="12" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid
|
|
x:Name="SwitchAreaGrid"
|
|
Grid.RowSpan="3"
|
|
Grid.ColumnSpan="3"
|
|
Margin="0,5"
|
|
HorizontalAlignment="Right"
|
|
ui:FocusVisualHelper.IsTemplateFocusTarget="True"
|
|
Background="{DynamicResource ToggleSwitchContainerBackground}" />
|
|
<ContentPresenter
|
|
x:Name="OffContentPresenter"
|
|
Grid.RowSpan="3"
|
|
Grid.Column="0"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding OffContent}"
|
|
ContentTemplate="{TemplateBinding OffContentTemplate}"
|
|
IsHitTestVisible="False"
|
|
Opacity="0"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
<ContentPresenter
|
|
x:Name="OnContentPresenter"
|
|
Grid.RowSpan="3"
|
|
Grid.Column="0"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding OnContent}"
|
|
ContentTemplate="{TemplateBinding OnContentTemplate}"
|
|
IsHitTestVisible="False"
|
|
Opacity="0"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
<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}" />
|
|
<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">
|
|
<Ellipse
|
|
x:Name="SwitchKnobOn"
|
|
Width="10"
|
|
Height="10"
|
|
Fill="{DynamicResource ToggleSwitchKnobFillOn}"
|
|
Opacity="0" />
|
|
<Ellipse
|
|
x:Name="SwitchKnobOff"
|
|
Width="10"
|
|
Height="10"
|
|
Fill="{DynamicResource ToggleSwitchKnobFillOff}" />
|
|
<Grid.RenderTransform>
|
|
<TranslateTransform x:Name="KnobTranslateTransform" />
|
|
</Grid.RenderTransform>
|
|
</Grid>
|
|
<Thumb
|
|
x:Name="SwitchThumb"
|
|
Grid.RowSpan="3"
|
|
Grid.ColumnSpan="3">
|
|
<Thumb.Template>
|
|
<ControlTemplate TargetType="Thumb">
|
|
<Rectangle Fill="Transparent" />
|
|
</ControlTemplate>
|
|
</Thumb.Template>
|
|
</Thumb>
|
|
</Grid>
|
|
</Grid>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="ToggleStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition
|
|
x:Name="DraggingToOnTransition"
|
|
GeneratedDuration="0"
|
|
From="Dragging"
|
|
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="0" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
|
|
</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>
|
|
</VisualTransition>
|
|
<VisualTransition
|
|
x:Name="OnToDraggingTransition"
|
|
GeneratedDuration="0"
|
|
From="On"
|
|
To="Dragging">
|
|
<Storyboard>
|
|
<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>
|
|
</VisualTransition>
|
|
<VisualTransition
|
|
x:Name="DraggingToOffTransition"
|
|
GeneratedDuration="0"
|
|
From="Dragging"
|
|
To="Off">
|
|
<Storyboard>
|
|
<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="0" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOn" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="SwitchKnobOff" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<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="0" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
|
|
</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>
|
|
</VisualTransition>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="Dragging" />
|
|
<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="0" Value="1" />
|
|
</DoubleAnimationUsingKeyFrames>
|
|
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="OuterBorder" Storyboard.TargetProperty="Opacity">
|
|
<DiscreteDoubleKeyFrame KeyTime="0" Value="0" />
|
|
</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>
|
|
</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 -->
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsMouseOver" Value="true" />
|
|
<Condition SourceName="SwitchThumb" Property="IsDragging" Value="false" />
|
|
</MultiTrigger.Conditions>
|
|
<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="Fill" 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}" />
|
|
</MultiTrigger>
|
|
<!-- Pressed -->
|
|
<Trigger SourceName="SwitchThumb" Property="IsDragging" Value="true">
|
|
<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="Fill" 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="Fill" 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>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultToggleSwitch}" TargetType="{x:Type ui:ToggleSwitch}" />
|
|
<!--#region 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="Black"
|
|
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>
|
|
<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="{StaticResource 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" />
|
|
|
|
<!-- Number Box -->
|
|
|
|
<Thickness x:Key="NumberBoxPopupIndicatorMargin">0,0,8,0</Thickness>
|
|
|
|
<Style
|
|
x:Key="NumberBoxSpinButtonStyle"
|
|
BasedOn="{StaticResource DefaultRepeatButtonStyle}"
|
|
TargetType="RepeatButton">
|
|
<Style.Setters>
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="MinWidth" Value="34" />
|
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="BorderBrush" Value="Transparent" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource SymbolThemeFontFamily}" />
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<ui:FontIconFallback Data="{Binding}" />
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style.Setters>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="NumberBoxPopupSpinButtonStyle"
|
|
BasedOn="{StaticResource DefaultRepeatButtonStyle}"
|
|
TargetType="RepeatButton">
|
|
<Style.Setters>
|
|
<Setter Property="Focusable" Value="False" />
|
|
<Setter Property="Width" Value="40" />
|
|
<Setter Property="Height" Value="32" />
|
|
<Setter Property="Background" Value="{DynamicResource NumberBoxPopupSpinButtonBackground}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource NumberBoxPopupSpinButtonBorderThickness}" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource SymbolThemeFontFamily}" />
|
|
<Setter Property="ContentTemplate">
|
|
<Setter.Value>
|
|
<DataTemplate>
|
|
<ui:FontIconFallback Data="{Binding}" />
|
|
</DataTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style.Setters>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="NumberBoxTextBoxStyle"
|
|
BasedOn="{StaticResource DefaultTextBoxStyle}"
|
|
TargetType="TextBox">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="TextBox">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="ScrollUpDown">M 10 2.138672 L 4.189453 7.939453 L 3.310547 7.060547 L 10 0.361328 L 16.689453 7.060547 L 15.810547 7.939453 Z M 10 17.861328 L 15.810547 12.060547 L 16.689453 12.939453 L 10 19.638672 L 3.310547 12.939453 L 4.189453 12.060547 Z</StreamGeometry>
|
|
<Style x:Key="DeleteButtonStyle" TargetType="Button">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="Cancel">M 10.888672 10 L 17.626953 16.748047 L 16.748047 17.626953 L 10 10.888672 L 3.251953 17.626953 L 2.373047 16.748047 L 9.111328 10 L 2.373047 3.251953 L 3.251953 2.373047 L 10 9.111328 L 16.748047 2.373047 L 17.626953 3.251953 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
<Border
|
|
x:Name="ButtonLayoutGrid"
|
|
Background="{DynamicResource TextControlButtonBackground}"
|
|
BorderBrush="{DynamicResource TextControlButtonBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
|
<ui:FontIconFallback
|
|
x:Name="GlyphElement"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="{StaticResource Cancel}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="12"
|
|
FontStyle="Normal"
|
|
Foreground="{DynamicResource TextControlButtonForeground}" />
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="ButtonLayoutGrid" Property="Background" Value="{DynamicResource TextControlButtonBackgroundPointerOver}" />
|
|
<Setter TargetName="ButtonLayoutGrid" Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPointerOver}" />
|
|
<Setter TargetName="GlyphElement" Property="Foreground" Value="{DynamicResource TextControlButtonForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="true">
|
|
<Setter TargetName="ButtonLayoutGrid" Property="Background" Value="{DynamicResource TextControlButtonBackgroundPressed}" />
|
|
<Setter TargetName="ButtonLayoutGrid" Property="BorderBrush" Value="{DynamicResource TextControlButtonBorderBrushPressed}" />
|
|
<Setter TargetName="GlyphElement" Property="Foreground" Value="{DynamicResource TextControlButtonForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="ButtonLayoutGrid" Property="Opacity" Value="0" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ControlTemplate.Resources>
|
|
<Grid SnapsToDevicePixels="True">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:ContentPresenterEx
|
|
x:Name="HeaderContentPresenter"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="{DynamicResource TextBoxTopHeaderMargin}"
|
|
VerticalAlignment="Top"
|
|
Content="{TemplateBinding ui:ControlHelper.Header}"
|
|
ContentTemplate="{TemplateBinding ui:ControlHelper.HeaderTemplate}"
|
|
FontWeight="Normal"
|
|
Foreground="{DynamicResource TextControlHeaderForeground}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextWrapping="Wrap"
|
|
Visibility="{TemplateBinding ui:ControlHelper.HeaderVisibility}" />
|
|
<Border
|
|
x:Name="BorderElement"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="3"
|
|
MinWidth="{TemplateBinding MinWidth}"
|
|
MinHeight="{TemplateBinding MinHeight}"
|
|
ui:ValidationHelper.IsTemplateValidationAdornerSite="True"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
|
|
<ScrollViewer
|
|
x:Name="PART_ContentHost"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
Focusable="False"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
IsTabStop="False"
|
|
Style="{DynamicResource TextControlContentHostStyle}"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}" />
|
|
<TextBlock
|
|
x:Name="PlaceholderTextContentPresenter"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
Foreground="{TemplateBinding ui:ControlHelper.PlaceholderForeground}"
|
|
IsHitTestVisible="False"
|
|
Text="{TemplateBinding ui:ControlHelper.PlaceholderText}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
TextWrapping="{TemplateBinding TextWrapping}" />
|
|
<Button
|
|
x:Name="DeleteButton"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
MinWidth="34"
|
|
Padding="{DynamicResource HelperButtonThemePadding}"
|
|
VerticalAlignment="Stretch"
|
|
ui:ControlHelper.CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius,
|
|
Converter={StaticResource RightCornerRadiusFilterConverter}}"
|
|
ui:TextBoxHelper.IsDeleteButton="True"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Focusable="False"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
IsTabStop="False"
|
|
Style="{StaticResource DeleteButtonStyle}"
|
|
Visibility="Collapsed" />
|
|
<ContentPresenter
|
|
x:Name="DescriptionPresenter"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
Content="{TemplateBinding ui:ControlHelper.Description}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{DynamicResource SystemControlDescriptionTextForegroundBrush}"
|
|
Visibility="{TemplateBinding ui:ControlHelper.DescriptionVisibility}" />
|
|
<ui:FontIconFallback
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Margin="{StaticResource NumberBoxPopupIndicatorMargin}"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="{StaticResource ScrollUpDown}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource NumberBoxPopupIndicatorForeground}" />
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="ButtonStates">
|
|
<VisualState x:Name="ButtonVisible">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{x:Static Visibility.Visible}" />
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="ButtonCollapsed" />
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="ui:ControlHelper.PlaceholderForeground" Value="{x:Null}">
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForeground}" />
|
|
</Trigger>
|
|
<Trigger Property="ui:TextBoxHelper.HasText" Value="True">
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource TextControlHeaderForegroundDisabled}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundDisabled}" />
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushDisabled}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundDisabled}" />
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundDisabled}" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushPointerOver}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundPointerOver}" />
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundPointerOver}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSelectionActive" Value="true">
|
|
<Setter TargetName="PlaceholderTextContentPresenter" Property="Foreground" Value="{DynamicResource TextControlPlaceholderForegroundFocused}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackgroundFocused}" />
|
|
<Setter TargetName="BorderElement" Property="BorderBrush" Value="{DynamicResource TextControlBorderBrushFocused}" />
|
|
<Setter TargetName="BorderElement" Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThicknessFocused}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForegroundFocused}" />
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="IsKeyboardFocused" Value="True" />
|
|
<Condition Property="ui:TextBoxHelper.HasText" Value="True" />
|
|
<Condition Property="IsReadOnly" Value="False" />
|
|
<Condition Property="AcceptsReturn" Value="False" />
|
|
<Condition Property="TextWrapping" Value="NoWrap" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter Property="ui:TextBoxHelper.IsDeleteButtonVisible" Value="True" />
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style TargetType="ui:NumberBox">
|
|
<Setter Property="IsTabStop" Value="False" />
|
|
<Setter Property="SelectionBrush" Value="{DynamicResource TextControlSelectionHighlightColor}" />
|
|
<Setter Property="FontFamily" Value="{DynamicResource ContentControlThemeFontFamily}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="CornerRadius" Value="4" />
|
|
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:NumberBox">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="ChevronDown">M 18.935547 4.560547 L 19.814453 5.439453 L 10 15.253906 L 0.185547 5.439453 L 1.064453 4.560547 L 10 13.496094 Z</StreamGeometry>
|
|
<StreamGeometry x:Key="ChevronUp">M 19.091797 14.970703 L 10 5.888672 L 0.908203 14.970703 L 0.029297 14.091797 L 10 4.111328 L 19.970703 14.091797 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<ui:ContentPresenterEx
|
|
x:Name="HeaderContentPresenter"
|
|
Grid.ColumnSpan="3"
|
|
Margin="{DynamicResource TextBoxTopHeaderMargin}"
|
|
VerticalAlignment="Top"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="Normal"
|
|
Foreground="{DynamicResource TextControlHeaderForeground}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextWrapping="Wrap"
|
|
Visibility="Collapsed" />
|
|
|
|
<TextBox
|
|
x:Name="InputBox"
|
|
Grid.Row="1"
|
|
ui:ControlHelper.CornerRadius="4"
|
|
ui:ControlHelper.PlaceholderText="{TemplateBinding PlaceholderText}"
|
|
Background="{DynamicResource CustomNumberBoxBG}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
Foreground="{DynamicResource Color05B}"
|
|
InputScope="{TemplateBinding InputScope}"
|
|
SelectionBrush="{TemplateBinding SelectionBrush}"
|
|
TextAlignment="{TemplateBinding TextAlignment}" />
|
|
|
|
<Popup
|
|
x:Name="UpDownPopup"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Left"
|
|
AllowsTransparency="True"
|
|
HorizontalOffset="{DynamicResource NumberBoxPopupHorizonalOffset}"
|
|
Placement="Right"
|
|
VerticalOffset="{DynamicResource NumberBoxPopupVerticalOffset}">
|
|
<ui:ThemeShadowChrome
|
|
CornerRadius="{DynamicResource OverlayCornerRadius}"
|
|
Depth="{DynamicResource NumberBoxPopupShadowDepth}"
|
|
IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">
|
|
<Border
|
|
x:Name="PopupContentRoot"
|
|
Background="{DynamicResource NumberBoxPopupBackground}"
|
|
BorderBrush="{DynamicResource NumberBoxPopupBorderBrush}"
|
|
BorderThickness="{DynamicResource NumberBoxPopupBorderThickness}"
|
|
CornerRadius="{DynamicResource OverlayCornerRadius}">
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<RepeatButton
|
|
x:Name="PopupUpSpinButton"
|
|
Content="{StaticResource ChevronUp}"
|
|
Style="{DynamicResource NumberBoxPopupSpinButtonStyle}" />
|
|
|
|
<RepeatButton
|
|
x:Name="PopupDownSpinButton"
|
|
Grid.Row="1"
|
|
Content="{StaticResource ChevronDown}"
|
|
Style="{DynamicResource NumberBoxPopupSpinButtonStyle}" />
|
|
</Grid>
|
|
</Border>
|
|
</ui:ThemeShadowChrome>
|
|
</Popup>
|
|
|
|
<RepeatButton
|
|
x:Name="UpSpinButton"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Margin="4,0,0,0"
|
|
ui:ControlHelper.CornerRadius="4"
|
|
Content="{StaticResource ChevronUp}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
Style="{DynamicResource NumberBoxSpinButtonStyle}"
|
|
Visibility="Collapsed" />
|
|
|
|
<RepeatButton
|
|
x:Name="DownSpinButton"
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
ui:ControlHelper.CornerRadius="4"
|
|
Content="{StaticResource ChevronDown}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
Style="{DynamicResource NumberBoxSpinButtonStyle}"
|
|
Visibility="Collapsed" />
|
|
|
|
<ContentPresenter
|
|
x:Name="DescriptionPresenter"
|
|
Grid.Row="2"
|
|
Grid.ColumnSpan="2"
|
|
Content="{TemplateBinding Description}"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{DynamicResource SystemControlDescriptionTextForegroundBrush}"
|
|
Visibility="{TemplateBinding ui:ControlHelper.DescriptionVisibility}" />
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal" />
|
|
<VisualState x:Name="Disabled" />
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="SpinButtonStates">
|
|
<VisualState x:Name="SpinButtonsCollapsed" />
|
|
<VisualState x:Name="SpinButtonsVisible" />
|
|
<VisualState x:Name="SpinButtonsPopup" />
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="UpSpinButtonEnabledStates">
|
|
<VisualState x:Name="UpSpinButtonEnabled" />
|
|
<VisualState x:Name="UpSpinButtonDisabled">
|
|
<Storyboard>
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="UpSpinButton" Storyboard.TargetProperty="IsEnabled">
|
|
<DiscreteBooleanKeyFrame KeyTime="0" Value="False" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="PopupUpSpinButton" Storyboard.TargetProperty="IsEnabled">
|
|
<DiscreteBooleanKeyFrame KeyTime="0" Value="False" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="DownSpinButtonEnabledStates">
|
|
<VisualState x:Name="DownSpinButtonEnabled" />
|
|
<VisualState x:Name="DownSpinButtonDisabled">
|
|
<Storyboard>
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="DownSpinButton" Storyboard.TargetProperty="IsEnabled">
|
|
<DiscreteBooleanKeyFrame KeyTime="0" Value="False" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
<BooleanAnimationUsingKeyFrames Storyboard.TargetName="PopupDownSpinButton" Storyboard.TargetProperty="IsEnabled">
|
|
<DiscreteBooleanKeyFrame KeyTime="0" Value="False" />
|
|
</BooleanAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource TextControlHeaderForegroundDisabled}" />
|
|
</Trigger>
|
|
<!-- SpinButtonsVisible -->
|
|
<Trigger Property="SpinButtonPlacementMode" Value="Inline">
|
|
<Setter TargetName="DownSpinButton" Property="Visibility" Value="Visible" />
|
|
<Setter TargetName="UpSpinButton" Property="Visibility" Value="Visible" />
|
|
<Setter TargetName="InputBox" Property="ui:ControlHelper.CornerRadius" Value="4" />
|
|
</Trigger>
|
|
<!-- SpinButtonsPopup -->
|
|
<Trigger Property="SpinButtonPlacementMode" Value="Compact">
|
|
<Setter TargetName="InputBox" Property="Style" Value="{DynamicResource NumberBoxTextBoxStyle}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<!--#endregion-->
|
|
|
|
|
|
<system:Double x:Key="MenuBarHeight">40</system:Double>
|
|
<Thickness x:Key="MenuFlyoutScrollerMargin">4,4,4,4</Thickness>
|
|
<Thickness x:Key="MenuFlyoutItemRevealBorderThickness">1</Thickness>
|
|
<Thickness x:Key="ToggleMenuFlyoutItemRevealBorderThickness">1</Thickness>
|
|
<Thickness x:Key="MenuFlyoutSubItemRevealBorderThickness">1</Thickness>
|
|
|
|
<ui:SharedSizeGroupConverter x:Key="SharedSizeGroupConverter" />
|
|
|
|
<Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type FrameworkElement}, ResourceId=MenuScrollViewer}" TargetType="ScrollViewer">
|
|
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled" />
|
|
<Setter Property="VerticalScrollBarVisibility" Value="Auto" />
|
|
<Setter Property="PanningMode" Value="VerticalOnly" />
|
|
</Style>
|
|
|
|
<Style x:Key="DefaultMenuItemSeparatorStyle" TargetType="Separator">
|
|
<Setter Property="Background" Value="{DynamicResource MenuFlyoutSeparatorBackground}" />
|
|
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutSeparatorThemePadding}" />
|
|
<Setter Property="SnapsToDevicePixels" Value="true" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Separator">
|
|
<Rectangle
|
|
Height="{DynamicResource MenuFlyoutSeparatorThemeHeight}"
|
|
Margin="{TemplateBinding Padding}"
|
|
Fill="{TemplateBinding Background}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="{x:Static MenuItem.SeparatorStyleKey}"
|
|
BasedOn="{StaticResource DefaultMenuItemSeparatorStyle}"
|
|
TargetType="Separator" />
|
|
|
|
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelItemTemplateKey}" TargetType="{x:Type MenuItem}">
|
|
<Grid
|
|
x:Name="ContentRoot"
|
|
Background="{TemplateBinding Background}"
|
|
SnapsToDevicePixels="True">
|
|
<Border
|
|
x:Name="Background"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" />
|
|
|
|
<ContentPresenter
|
|
Margin="12,0,12,0"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
ContentSource="Header"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPressed}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPressed}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=TopLevelHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
|
|
<Grid
|
|
x:Name="ContentRoot"
|
|
Background="{TemplateBinding Background}"
|
|
SnapsToDevicePixels="True">
|
|
<Border
|
|
x:Name="Background"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" />
|
|
|
|
<ContentPresenter
|
|
Margin="12,0,12,0"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
ContentSource="Header"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
|
|
<ui:MenuPopup
|
|
x:Name="PART_Popup"
|
|
AllowsTransparency="true"
|
|
Focusable="false"
|
|
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Placement="Bottom"
|
|
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
|
|
<ui:ThemeShadowChrome CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">
|
|
<Border
|
|
x:Name="SubMenuRoot"
|
|
Background="{DynamicResource MenuFlyoutPresenterBackground}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
|
<Grid>
|
|
<ScrollViewer
|
|
x:Name="SubMenuScrollViewer"
|
|
MinWidth="{DynamicResource FlyoutThemeMinWidth}"
|
|
Margin="{DynamicResource MenuFlyoutPresenterThemePadding}"
|
|
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
|
|
TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
|
<ItemsPresenter
|
|
Grid.IsSharedSizeScope="true"
|
|
KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
KeyboardNavigation.TabNavigation="Cycle"
|
|
RenderOptions.ClearTypeHint="Enabled"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ScrollViewer>
|
|
<Border
|
|
x:Name="SubMenuBorder"
|
|
BorderBrush="{DynamicResource MenuFlyoutPresenterBorderBrush}"
|
|
BorderThickness="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
|
|
</Grid>
|
|
</Border>
|
|
</ui:ThemeShadowChrome>
|
|
</ui:MenuPopup>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
|
|
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
|
|
</Trigger>
|
|
<Trigger SourceName="PART_Popup" Property="IsSuspendingAnimation" Value="true">
|
|
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPointerOver}" />
|
|
</Trigger>
|
|
<!-- Selected -->
|
|
<Trigger Property="IsSubmenuOpen" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundSelected}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushSelected}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="Background" Property="Background" Value="{DynamicResource MenuBarItemBackgroundPressed}" />
|
|
<Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource MenuBarItemBorderBrushPressed}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<!-- DefaultMenuFlyoutSubItemStyle -->
|
|
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuItemTemplateKey}" TargetType="{x:Type MenuItem}">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="CheckMark">F1 M 17.939453 5.439453 L 7.5 15.888672 L 2.060547 10.439453 L 2.939453 9.560547 L 7.5 14.111328 L 17.060547 4.560547 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
<Border
|
|
x:Name="LayoutRoot"
|
|
Height="Auto"
|
|
Margin="5,2,5,2"
|
|
Padding="{TemplateBinding Padding}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
SnapsToDevicePixels="true"
|
|
TextElement.Foreground="{DynamicResource Color05B}"
|
|
UseLayoutRounding="True">
|
|
<Grid x:Name="AnimationRoot">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="{TemplateBinding Visibility, Converter={StaticResource SharedSizeGroupConverter}, ConverterParameter=MenuItemCheckColumnGroup}" />
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="{TemplateBinding Visibility, Converter={StaticResource SharedSizeGroupConverter}, ConverterParameter=MenuItemIconColumnGroup}" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<ui:FontIconFallback
|
|
x:Name="CheckGlyph"
|
|
Margin="0,0,16,0"
|
|
Data="{StaticResource CheckMark}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource ToggleMenuFlyoutItemCheckGlyphForeground}"
|
|
Opacity="0"
|
|
Visibility="Collapsed" />
|
|
<Viewbox
|
|
x:Name="IconRoot"
|
|
Grid.Column="1"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="0,1,12,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Stretch"
|
|
TextBlock.FontFamily="/Resources/#Segoe Fluent Icons">
|
|
<ContentPresenter
|
|
x:Name="IconContent"
|
|
ContentSource="Icon"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Viewbox>
|
|
<ContentPresenter
|
|
x:Name="ContentPresenter"
|
|
Grid.Column="2"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
ContentSource="Header"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{DynamicResource Color05B}" />
|
|
<TextBlock
|
|
x:Name="KeyboardAcceleratorTextBlock"
|
|
Grid.Column="3"
|
|
Margin="24,4,0,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Foreground="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForeground}"
|
|
Style="{StaticResource CaptionTextBlockStyle}"
|
|
Text="{TemplateBinding InputGestureText}"
|
|
Visibility="Collapsed" />
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsVisible" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
</Trigger>
|
|
<Trigger Property="Icon" Value="{x:Null}">
|
|
<Setter TargetName="IconRoot" Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="InputGestureText" Value="">
|
|
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="IsChecked" Value="True">
|
|
<Setter TargetName="CheckGlyph" Property="Opacity" Value="1" />
|
|
</Trigger>
|
|
<Trigger Property="IsCheckable" Value="True">
|
|
<Setter TargetName="CheckGlyph" Property="Visibility" Value="Visible" />
|
|
</Trigger>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomContextHover}" />
|
|
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource CustomContextClick}" />
|
|
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutItemBackgroundDisabled}" />
|
|
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutItemForegroundDisabled}" />
|
|
<Setter TargetName="KeyboardAcceleratorTextBlock" Property="Foreground" Value="{DynamicResource MenuFlyoutItemKeyboardAcceleratorTextForegroundDisabled}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<!-- DefaultMenuFlyoutItemStyle -->
|
|
<ControlTemplate x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuHeaderTemplateKey}" TargetType="{x:Type MenuItem}">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="ChevronRight">M 5.029297 19.091797 L 14.111328 10 L 5.029297 0.908203 L 5.908203 0.029297 L 15.888672 10 L 5.908203 19.970703 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
<Border
|
|
x:Name="LayoutRoot"
|
|
Margin="{DynamicResource MenuFlyoutItemMargin}"
|
|
Padding="{TemplateBinding Padding}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
SnapsToDevicePixels="True">
|
|
<Grid x:Name="AnimationRoot">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemCheckColumnGroup" />
|
|
<ColumnDefinition Width="Auto" SharedSizeGroup="MenuItemIconColumnGroup" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Viewbox
|
|
x:Name="IconRoot"
|
|
Grid.Column="1"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="0,0,12,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center">
|
|
<ContentPresenter
|
|
x:Name="IconContent"
|
|
ContentSource="Icon"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</Viewbox>
|
|
<ContentPresenter
|
|
x:Name="ContentPresenter"
|
|
Grid.Column="2"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
ContentSource="Header"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
<ui:FontIconFallback
|
|
x:Name="SubItemChevron"
|
|
Grid.Column="3"
|
|
Margin="{DynamicResource MenuFlyoutItemChevronMargin}"
|
|
Data="{StaticResource ChevronRight}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="12"
|
|
Foreground="{DynamicResource MenuFlyoutSubItemChevron}">
|
|
<UIElement.RenderTransform>
|
|
<TranslateTransform Y="1" />
|
|
</UIElement.RenderTransform>
|
|
</ui:FontIconFallback>
|
|
<Popup
|
|
x:Name="PART_Popup"
|
|
AllowsTransparency="true"
|
|
Focusable="false"
|
|
IsOpen="{Binding IsSubmenuOpen, RelativeSource={RelativeSource TemplatedParent}}"
|
|
Placement="Right"
|
|
PlacementTarget="{Binding ElementName=LayoutRoot}"
|
|
PopupAnimation="{DynamicResource {x:Static SystemParameters.MenuPopupAnimationKey}}">
|
|
<Popup.PlacementRectangle>
|
|
<MultiBinding>
|
|
<MultiBinding.Converter>
|
|
<ui:PlacementRectangleConverter Margin="4,-1" />
|
|
</MultiBinding.Converter>
|
|
<Binding ElementName="LayoutRoot" Path="ActualWidth" />
|
|
<Binding ElementName="LayoutRoot" Path="ActualHeight" />
|
|
</MultiBinding>
|
|
</Popup.PlacementRectangle>
|
|
<ui:ThemeShadowChrome CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" IsShadowEnabled="{DynamicResource {x:Static SystemParameters.DropShadowKey}}">
|
|
<Border
|
|
x:Name="SubMenuRoot"
|
|
Background="{DynamicResource MenuFlyoutPresenterBackground}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}">
|
|
<Grid>
|
|
<ScrollViewer
|
|
x:Name="SubMenuScrollViewer"
|
|
MinWidth="{DynamicResource FlyoutThemeMinWidth}"
|
|
Margin="{DynamicResource MenuFlyoutPresenterThemePadding}"
|
|
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
|
|
TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
|
<ItemsPresenter
|
|
Grid.IsSharedSizeScope="true"
|
|
KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
KeyboardNavigation.TabNavigation="Cycle"
|
|
RenderOptions.ClearTypeHint="Enabled"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ScrollViewer>
|
|
<Border
|
|
x:Name="SubMenuBorder"
|
|
BorderBrush="{DynamicResource MenuFlyoutPresenterBorderBrush}"
|
|
BorderThickness="{DynamicResource MenuFlyoutPresenterBorderThemeThickness}"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
|
|
</Grid>
|
|
</Border>
|
|
</ui:ThemeShadowChrome>
|
|
</Popup>
|
|
</Grid>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsVisible" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource Color05B}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSuspendingPopupAnimation" Value="true">
|
|
<Setter TargetName="PART_Popup" Property="PopupAnimation" Value="None" />
|
|
</Trigger>
|
|
<Trigger Property="Icon" Value="{x:Null}">
|
|
<Setter TargetName="IconRoot" Property="Visibility" Value="Collapsed" />
|
|
</Trigger>
|
|
<Trigger Property="IsHighlighted" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundPointerOver}" />
|
|
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronPointerOver}" />
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundPressed}" />
|
|
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronPressed}" />
|
|
</Trigger>
|
|
<Trigger Property="IsSubmenuOpen" Value="True">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundSubMenuOpened}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundSubMenuOpened}" />
|
|
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronSubMenuOpened}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackgroundDisabled}" />
|
|
<Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource MenuFlyoutSubItemForegroundDisabled}" />
|
|
<Setter TargetName="SubItemChevron" Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemChevronDisabled}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
|
|
<Style x:Key="DefaultMenuItemStyle" TargetType="{x:Type MenuItem}">
|
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
|
<Setter Property="Background" Value="{DynamicResource MenuFlyoutItemBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutItemForeground}" />
|
|
<Setter Property="Padding" Value="{DynamicResource MenuFlyoutItemThemePaddingNarrow}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
<Setter Property="ScrollViewer.PanningMode" Value="Both" />
|
|
<Setter Property="Stylus.IsFlicksEnabled" Value="False" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="{DynamicResource UseSystemFocusVisuals}" />
|
|
<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="IsTabStop" Value="True" />
|
|
<Setter Property="Height" Value="{StaticResource 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="IsTabStop" Value="True" />
|
|
<Setter Property="Height" Value="{StaticResource MenuBarHeight}" />
|
|
</Trigger>
|
|
<Trigger Property="Role" Value="SubmenuHeader">
|
|
<Setter Property="Background" Value="{DynamicResource MenuFlyoutSubItemBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource MenuFlyoutSubItemForeground}" />
|
|
<Setter Property="Template" Value="{DynamicResource {ComponentResourceKey TypeInTargetAssembly={x:Type MenuItem}, ResourceId=SubmenuHeaderTemplateKey}}" />
|
|
</Trigger>
|
|
<Trigger Property="IsCheckable" Value="True">
|
|
<Setter Property="Background" Value="Transparent" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="True" />
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
|
|
<Style BasedOn="{StaticResource DefaultMenuItemStyle}" TargetType="{x:Type MenuItem}" />
|
|
|
|
|
|
|
|
<Style TargetType="{x:Type ContextMenu}">
|
|
<Setter Property="Background" Value="{DynamicResource CustomContextBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource CustomContextBorder}" />
|
|
<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="FontWeight" Value="Normal" />
|
|
<Setter Property="Grid.IsSharedSizeScope" Value="true" />
|
|
<Setter Property="HasDropShadow" Value="{DynamicResource {x:Static SystemParameters.DropShadowKey}}" />
|
|
<!--<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />-->
|
|
<!--<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />-->
|
|
<!--<Setter Property="ScrollViewer.PanningMode" Value="VerticalOnly" />-->
|
|
<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="{x:Type ContextMenu}">
|
|
<ui:ThemeShadowChrome
|
|
x:Name="Shdw"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}"
|
|
IsShadowEnabled="{TemplateBinding HasDropShadow}"
|
|
SnapsToDevicePixels="True">
|
|
<Border
|
|
x:Name="Border"
|
|
Padding="0,4,0,4"
|
|
Background="{DynamicResource CustomContextBackground}"
|
|
BorderBrush="{DynamicResource CustomContextBorder}"
|
|
BorderThickness="1"
|
|
CornerRadius="8">
|
|
<Grid>
|
|
<ScrollViewer
|
|
x:Name="ContextMenuScrollViewer"
|
|
MinWidth="{DynamicResource FlyoutThemeMinWidth}"
|
|
Margin="{TemplateBinding Padding}"
|
|
Style="{DynamicResource {ComponentResourceKey ResourceId=MenuScrollViewer,
|
|
TypeInTargetAssembly={x:Type FrameworkElement}}}">
|
|
<ItemsPresenter
|
|
KeyboardNavigation.DirectionalNavigation="Cycle"
|
|
RenderOptions.ClearTypeHint="Enabled"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
|
</ScrollViewer>
|
|
<Border
|
|
x:Name="ContextMenuBorder"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="0"
|
|
CornerRadius="{TemplateBinding ui:ControlHelper.CornerRadius}" />
|
|
</Grid>
|
|
</Border>
|
|
</ui:ThemeShadowChrome>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsVisible" Value="true">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource CustomContextBackground}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource CustomContextBorder}" />
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Border" Property="Background" Value="{DynamicResource CustomContextBackground}" />
|
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource CustomContextBorder}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<ui:TextContextMenu x:Key="TextControlContextMenu" x:Shared="False" />
|
|
|
|
<!-- 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>
|
|
<Style x:Key="HyperLinkBtnStyle" TargetType="Hyperlink">
|
|
<Setter Property="Foreground" Value="{DynamicResource PluginInfoColor}" />
|
|
<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 ContentDialogForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource ContentDialogBackground}" />
|
|
<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="{DynamicResource ContentDialogPadding}">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<ScrollViewer
|
|
x:Name="ContentScrollViewer"
|
|
Margin="{DynamicResource ContentDialogContentScrollViewerMargin}"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
IsTabStop="False"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
|
<Grid>
|
|
<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>
|
|
</ScrollViewer>
|
|
<Grid
|
|
x:Name="CommandSpace"
|
|
Grid.Row="1"
|
|
Margin="{DynamicResource ContentDialogCommandSpaceMargin}"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Bottom"
|
|
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>
|
|
</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>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="PrimaryVisible">
|
|
<Storyboard>
|
|
<Int32AnimationUsingKeyFrames Storyboard.TargetName="PrimaryButton" Storyboard.TargetProperty="(Grid.Column)">
|
|
<DiscreteInt32KeyFrame KeyTime="0:0:0" Value="2" />
|
|
</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="2,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="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="PrimaryButton" 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="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>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondaryButton" 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="NavigationViewOverflowButtonStyleWhenPaneOnTop"
|
|
BasedOn="{StaticResource DefaultButtonStyle}"
|
|
TargetType="Button">
|
|
<Setter Property="Background" Value="{DynamicResource NavigationViewItemBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TopNavigationViewItemForeground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource NavigationViewItemBorderThickness}" />
|
|
<Setter Property="Height" Value="{DynamicResource PaneToggleButtonHeight}" />
|
|
<Setter Property="Width" Value="{DynamicResource TopNavigationViewOverflowButtonWidth}" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="True" />
|
|
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid
|
|
x:Name="RootGrid"
|
|
Width="{TemplateBinding Width}"
|
|
Height="{TemplateBinding Height}"
|
|
Background="{TemplateBinding Background}">
|
|
<Rectangle
|
|
x:Name="PointerRectangle"
|
|
Fill="Transparent"
|
|
Visibility="Collapsed" />
|
|
<Border
|
|
x:Name="RevealBorder"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" />
|
|
<ui:FontIconFallback
|
|
x:Name="Icon"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="{StaticResource More}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="20"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
IsHitTestVisible="False" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<!-- PointerOver -->
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<!-- Pressed -->
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<!-- Disabled -->
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundDisabled}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style
|
|
x:Key="NavigationViewOverflowButtonNoLabelStyleWhenPaneOnTop"
|
|
BasedOn="{StaticResource DefaultButtonStyle}"
|
|
TargetType="Button">
|
|
<Setter Property="Background" Value="{DynamicResource NavigationViewItemBackground}" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TopNavigationViewItemForeground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource NavigationViewItemBorderThickness}" />
|
|
<Setter Property="Height" Value="{DynamicResource TopNavigationViewOverflowButtonHeight}" />
|
|
<Setter Property="Width" Value="{DynamicResource TopNavigationViewOverflowButtonWidth}" />
|
|
<Setter Property="HorizontalAlignment" Value="Left" />
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" />
|
|
<Setter Property="ui:FocusVisualHelper.UseSystemFocusVisuals" Value="True" />
|
|
<Setter Property="ui:FocusVisualHelper.FocusVisualMargin" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<ControlTemplate.Resources>
|
|
<StreamGeometry x:Key="ChevronDown">M 18.935547 4.560547 L 19.814453 5.439453 L 10 15.253906 L 0.185547 5.439453 L 1.064453 4.560547 L 10 13.496094 Z</StreamGeometry>
|
|
</ControlTemplate.Resources>
|
|
<Grid
|
|
x:Name="RootGrid"
|
|
Width="{TemplateBinding Width}"
|
|
Height="{TemplateBinding Height}"
|
|
Background="{TemplateBinding Background}">
|
|
<Rectangle x:Name="PointerRectangle" Fill="Transparent" />
|
|
<Border
|
|
x:Name="RevealBorder"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" />
|
|
<ui:FontIconFallback
|
|
x:Name="Icon"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Data="{StaticResource More}"
|
|
FontFamily="{DynamicResource SymbolThemeFontFamily}"
|
|
FontSize="20"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
IsHitTestVisible="False" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<!-- PointerOver -->
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<!-- Pressed -->
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="RootGrid" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<!-- Disabled -->
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter TargetName="Icon" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundDisabled}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</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 x:Key="MUX_NavigationViewSettingsItemStyleWhenOnTopPane" 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="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:NavigationViewItem">
|
|
<Grid x:Name="LayoutRoot" Background="{TemplateBinding Background}">
|
|
<Rectangle x:Name="PointerRectangle" Fill="Transparent" />
|
|
<Border
|
|
x:Name="RevealBorder"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" />
|
|
<Grid x:Name="ContentGrid">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition x:Name="IconRow" Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
<Viewbox
|
|
x:Name="IconBox"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Width="48"
|
|
Height="16"
|
|
Margin="0,0,0,0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<ContentPresenter
|
|
x:Name="Icon"
|
|
Content="{TemplateBinding Icon}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
</Viewbox>
|
|
</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>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOver">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="Pressed">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="Selected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundSelected}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundSelected}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundSelected}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOverSelected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundSelectedPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PressedSelected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundSelectedPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger SourceName="DisabledStatesListener" Property="CurrentStateName" Value="Disabled">
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundDisabled}" />
|
|
<Setter TargetName="RevealBorder" Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrushCheckedDisabled}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="MUX_NavigationViewItemPresenterStyleWhenOnTopPane" TargetType="ui:NavigationViewItemPresenter">
|
|
<Setter Property="Foreground" Value="{DynamicResource TopNavigationViewItemForeground}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:NavigationViewItemPresenter">
|
|
<Grid x:Name="LayoutRoot" 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>
|
|
<Rectangle
|
|
x:Name="PointerRectangle"
|
|
Fill="Transparent"
|
|
Visibility="Collapsed" />
|
|
<Border
|
|
x:Name="RevealBorder"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}" />
|
|
<Grid x:Name="ContentGrid">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Viewbox
|
|
x:Name="IconBox"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="16,0,0,0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<ContentPresenter
|
|
x:Name="Icon"
|
|
Content="{TemplateBinding Icon}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
</Viewbox>
|
|
<ui:ContentPresenterEx
|
|
x:Name="ContentPresenter"
|
|
Grid.Column="1"
|
|
Margin="{DynamicResource TopNavigationViewItemContentPresenterMargin}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="Center"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
TextWrapping="NoWrap" />
|
|
<Grid
|
|
x:Name="ExpandCollapseChevron"
|
|
Grid.Column="2"
|
|
Width="40"
|
|
Margin="{DynamicResource TopNavigationViewItemExpandChevronMargin}"
|
|
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" />
|
|
</ui:FontIconFallback.RenderTransform>
|
|
</ui:FontIconFallback>
|
|
</Grid>
|
|
</Grid>
|
|
<Grid
|
|
x:Name="SelectionIndicatorGrid"
|
|
Margin="16,0,16,4"
|
|
VerticalAlignment="Bottom">
|
|
<Rectangle
|
|
x:Name="SelectionIndicator"
|
|
Height="2"
|
|
Fill="{DynamicResource NavigationViewSelectionIndicatorForeground}"
|
|
Opacity="0"
|
|
RadiusX="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
|
|
RadiusY="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}" />
|
|
</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="NavigationViewIconPositionStates">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="NavigationViewIconPositionStatesListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="IconOnLeft" />
|
|
<VisualState x:Name="IconOnly" />
|
|
<VisualState x:Name="ContentOnly" />
|
|
</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>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOver">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="Pressed">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="Selected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundSelected}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundSelected}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundSelected}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundSelected}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOverSelected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundSelectedPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PressedSelected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource TopNavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="PointerRectangle" Property="Fill" Value="{DynamicResource NavigationViewItemBackgroundSelectedPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger SourceName="DisabledStatesListener" Property="CurrentStateName" Value="Disabled">
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundDisabled}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundDisabled}" />
|
|
<Setter TargetName="RevealBorder" Property="BorderBrush" Value="{DynamicResource NavigationViewItemBorderBrushCheckedDisabled}" />
|
|
</Trigger>
|
|
<Trigger SourceName="NavigationViewIconPositionStatesListener" Property="CurrentStateName" Value="IconOnly">
|
|
<Setter TargetName="PointerRectangle" Property="Visibility" Value="Visible" />
|
|
<Setter TargetName="LayoutRoot" Property="MinWidth" Value="48" />
|
|
<Setter TargetName="ContentPresenter" Property="Visibility" Value="Collapsed" />
|
|
<Setter TargetName="SelectionIndicatorGrid" Property="Margin" Value="4,0,4,4" />
|
|
<Setter TargetName="ExpandCollapseChevron" Property="Margin" Value="{DynamicResource TopNavigationViewItemIconOnlyExpandChevronMargin}" />
|
|
</Trigger>
|
|
<Trigger SourceName="NavigationViewIconPositionStatesListener" Property="CurrentStateName" Value="ContentOnly">
|
|
<Setter TargetName="IconBox" Property="Visibility" Value="Collapsed" />
|
|
<Setter TargetName="ContentPresenter" Property="Margin" Value="{DynamicResource TopNavigationViewItemContentOnlyContentPresenterMargin}" />
|
|
<Setter TargetName="SelectionIndicatorGrid" Property="Margin" Value="12,0,12,4" />
|
|
<Setter TargetName="ExpandCollapseChevron" Property="Margin" Value="{DynamicResource TopNavigationViewItemContentOnlyExpandChevronMargin}" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="MUX_NavigationViewItemPresenterStyleWhenOnTopPaneOverflow" TargetType="ui:NavigationViewItemPresenter">
|
|
<Setter Property="Foreground" Value="{DynamicResource TopNavigationViewItemForeground}" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ui:NavigationViewItemPresenter">
|
|
<Grid
|
|
x:Name="LayoutRoot"
|
|
Height="40"
|
|
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>
|
|
<Grid x:Name="PresenterContentRootGrid">
|
|
<!-- Wrap SelectionIndicator in a grid so that its offset is 0,0 - this enables the offset animation. -->
|
|
<Grid
|
|
Margin="4,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center">
|
|
|
|
<Rectangle
|
|
x:Name="SelectionIndicator"
|
|
Width="2"
|
|
Height="24"
|
|
Fill="{DynamicResource NavigationViewSelectionIndicatorForeground}"
|
|
Opacity="0.0"
|
|
RadiusX="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource TopLeftCornerRadiusDoubleValueConverter}}"
|
|
RadiusY="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BottomRightCornerRadiusDoubleValueConverter}}" />
|
|
</Grid>
|
|
<Grid x:Name="ContentGrid">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="Auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Viewbox
|
|
x:Name="IconBox"
|
|
Width="16"
|
|
Height="16"
|
|
Margin="16,0,0,0"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<ContentPresenter
|
|
x:Name="Icon"
|
|
Content="{TemplateBinding Icon}"
|
|
TextElement.Foreground="{TemplateBinding Foreground}" />
|
|
</Viewbox>
|
|
<ui:ContentPresenterEx
|
|
x:Name="ContentPresenter"
|
|
Grid.Column="1"
|
|
Margin="{DynamicResource TopNavigationViewItemOnOverflowContentPresenterMargin}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="Center"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
TextWrapping="NoWrap" />
|
|
<Grid
|
|
x:Name="ExpandCollapseChevron"
|
|
Grid.Column="2"
|
|
Width="40"
|
|
Margin="{DynamicResource TopNavigationViewItemOnOverflowExpandChevronMargin}"
|
|
HorizontalAlignment="Right"
|
|
Background="Transparent"
|
|
Visibility="Collapsed">
|
|
<Border Padding="{DynamicResource TopNavigationViewItemOnOverflowExpandChevronPadding}">
|
|
<ui:FontIconFallback
|
|
Width="12"
|
|
Height="12"
|
|
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" />
|
|
</ui:FontIconFallback.RenderTransform>
|
|
</ui:FontIconFallback>
|
|
</Border>
|
|
</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="NavigationViewIconPositionStates">
|
|
<ui:VisualStateGroupListener.Listener>
|
|
<ui:VisualStateGroupListener x:Name="NavigationViewIconPositionStatesListener" />
|
|
</ui:VisualStateGroupListener.Listener>
|
|
<VisualState x:Name="IconOnLeft" />
|
|
<VisualState x:Name="IconOnly" />
|
|
<VisualState x:Name="ContentOnly" />
|
|
</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>
|
|
</VisualStateManager.VisualStateGroups>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOver">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource NavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="Pressed">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="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="Foreground" Value="{DynamicResource NavigationViewItemForegroundSelected}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PointerOverSelected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundSelectedPointerOver}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPointerOver}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource NavigationViewItemForegroundPointerOver}" />
|
|
</Trigger>
|
|
<Trigger SourceName="PointerStatesListener" Property="CurrentStateName" Value="PressedSelected">
|
|
<Setter TargetName="LayoutRoot" Property="Background" Value="{DynamicResource NavigationViewItemBackgroundSelectedPressed}" />
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource NavigationViewItemForegroundPressed}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource NavigationViewItemForegroundPressed}" />
|
|
</Trigger>
|
|
<Trigger SourceName="DisabledStatesListener" Property="CurrentStateName" Value="Disabled">
|
|
<Setter TargetName="Icon" Property="TextElement.Foreground" Value="{DynamicResource TopNavigationViewItemForegroundDisabled}" />
|
|
<Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource TopNavigationViewItemForegroundDisabled}" />
|
|
</Trigger>
|
|
<Trigger SourceName="NavigationViewIconPositionStatesListener" Property="CurrentStateName" Value="ContentOnly">
|
|
<Setter TargetName="IconBox" Property="Visibility" Value="Collapsed" />
|
|
<Setter TargetName="ContentPresenter" Property="Margin" Value="{DynamicResource TopNavigationViewItemOnOverflowNoIconContentPresenterMargin}" />
|
|
</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">
|
|
<ScrollViewer 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>
|
|
</ScrollViewer>
|
|
</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>
|
|
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
|
<ui:ItemsRepeater x:Name="TopNavMenuItemsOverflowHost" />
|
|
</ScrollViewer>
|
|
</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" ui: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">
|
|
<ScrollViewer
|
|
x:Name="MenuItemsScrollViewer"
|
|
KeyboardNavigation.TabNavigation="Local"
|
|
VerticalScrollBarVisibility="Auto">
|
|
<!-- Left nav ItemsRepeater -->
|
|
<ui:ItemsRepeater x:Name="MenuItemsHost" AutomationProperties.Name="{TemplateBinding AutomationProperties.Name}" />
|
|
</ScrollViewer>
|
|
</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">
|
|
<ScrollViewer x:Name="FooterItemsScrollViewer">
|
|
<!-- contract7Present:VerticalAnchorRatio="1" -->
|
|
<ui:ItemsRepeater x:Name="FooterMenuItemsHost" />
|
|
</ScrollViewer>
|
|
</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>
|
|
</ResourceDictionary>
|