1741 lines
147 KiB
XML
1741 lines
147 KiB
XML
<Application x:Class="CalculatorApp.App"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:Controls="using:CalculatorApp.Controls"
|
|
xmlns:common="using:CalculatorApp.Common"
|
|
xmlns:converters="using:CalculatorApp.Converters"
|
|
xmlns:local="using:CalculatorApp">
|
|
|
|
<Application.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls"/>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary.ThemeDictionaries>
|
|
<ResourceDictionary x:Key="Default">
|
|
<Thickness x:Key="HighContrastThicknessTop">0,0,0,0</Thickness>
|
|
<x:Double x:Key="HighContrastStrokeThickness">0</x:Double>
|
|
<Color x:Key="AltHighColor">#FF000000</Color>
|
|
<Color x:Key="ChromeMediumLowColor">#FF2B2B2B</Color>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{StaticResource AltHighColor}"/>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource ChromeMediumLowColor}"/>
|
|
<SolidColorBrush x:Key="TitleBarForegroundBaseHighBrush" Color="{StaticResource SystemBaseHighColor}"/>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundTransparentBrush" Color="Transparent"/>
|
|
<SolidColorBrush x:Key="SystemControlHighlightTransparentBrush" Color="Transparent"/>
|
|
<SolidColorBrush x:Key="AppBackgroundAltMediumLowBrush" Color="{ThemeResource SystemAltMediumLowColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextBaseMediumHighBrush" Color="{StaticResource SystemBaseMediumHighColor}"/>
|
|
<RevealBackgroundBrush x:Key="AppControlHoverButtonFaceBrush" Color="#18FFFFFF"/>
|
|
<RevealBackgroundBrush x:Key="AppControlPressedButtonFaceBrush" Color="#30FFFFFF"/>
|
|
<SolidColorBrush x:Key="AppControlTransparentAccentColorBrush" Color="{ThemeResource SystemAccentColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextBaseHighColorBrush" Color="{StaticResource SystemBaseHighColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextRedColorBrush" Color="Red"/>
|
|
<RevealBorderBrush x:Key="AppControlForegroundTransparentRevealBorderBrush"
|
|
FallbackColor="Transparent"
|
|
TargetTheme="Dark"
|
|
Color="Transparent"/>
|
|
<RevealBackgroundBrush x:Key="AppControlHighlightAccentRevealBackgroundBrush"
|
|
FallbackColor="{ThemeResource SystemAccentColor}"
|
|
TargetTheme="Dark"
|
|
Color="{ThemeResource SystemAccentColor}"/>
|
|
<RevealBackgroundBrush x:Key="AppControlBackgroundListAccentHighRevealBackgroundBrush"
|
|
FallbackColor="{ThemeResource SystemAccentColorDark3}"
|
|
TargetTheme="Dark"
|
|
Color="{ThemeResource SystemAccentColorDark3}"/>
|
|
<AcrylicBrush x:Key="AppChromeAcrylicHostBackdropMediumLowBrush"
|
|
BackgroundSource="HostBackdrop"
|
|
FallbackColor="{ThemeResource SystemChromeMediumColor}"
|
|
TintColor="{ThemeResource SystemChromeLowColor}"
|
|
TintOpacity="0.7"/>
|
|
<SolidColorBrush x:Key="EquationBoxPointerOverBackgroundBrush" Color="{ThemeResource SystemControlBackgroundAltMediumBrush}"/>
|
|
<SolidColorBrush x:Key="EquationBoxHoverButtonForegroundBrush" Color="{ThemeResource SystemBaseHighColor}"/>
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="Light">
|
|
<Thickness x:Key="HighContrastThicknessTop">0,0,0,0</Thickness>
|
|
<x:Double x:Key="HighContrastStrokeThickness">0</x:Double>
|
|
<Color x:Key="AltHighColor">#FFF2F2F2</Color>
|
|
<Color x:Key="ChromeMediumLowColor">#FFE0E0E0</Color>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{StaticResource SystemAltHighColor}"/>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{StaticResource ChromeMediumLowColor}"/>
|
|
<SolidColorBrush x:Key="TitleBarForegroundBaseHighBrush" Color="{StaticResource SystemBaseHighColor}"/>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundTransparentBrush" Color="Transparent"/>
|
|
<SolidColorBrush x:Key="SystemControlHighlightTransparentBrush" Color="Transparent"/>
|
|
<SolidColorBrush x:Key="AppBackgroundAltMediumLowBrush" Color="{ThemeResource SystemAltMediumLowColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextBaseMediumHighBrush" Color="{StaticResource SystemBaseMediumHighColor}"/>
|
|
<RevealBackgroundBrush x:Key="AppControlHoverButtonFaceBrush" Color="#17000000"/>
|
|
<RevealBackgroundBrush x:Key="AppControlPressedButtonFaceBrush" Color="#30000000"/>
|
|
<SolidColorBrush x:Key="AppControlTransparentAccentColorBrush" Color="{ThemeResource SystemAccentColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextBaseHighColorBrush" Color="{StaticResource SystemBaseHighColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextRedColorBrush" Color="Red"/>
|
|
<RevealBorderBrush x:Key="AppControlForegroundTransparentRevealBorderBrush"
|
|
FallbackColor="Transparent"
|
|
TargetTheme="Light"
|
|
Color="Transparent"/>
|
|
<RevealBackgroundBrush x:Key="AppControlHighlightAccentRevealBackgroundBrush"
|
|
FallbackColor="{ThemeResource SystemAccentColor}"
|
|
TargetTheme="Light"
|
|
Color="{ThemeResource SystemAccentColor}"/>
|
|
<RevealBackgroundBrush x:Key="AppControlBackgroundListAccentHighRevealBackgroundBrush"
|
|
FallbackColor="{ThemeResource SystemAccentColorLight3}"
|
|
TargetTheme="Light"
|
|
Color="{ThemeResource SystemAccentColorLight3}"/>
|
|
<AcrylicBrush x:Key="AppChromeAcrylicHostBackdropMediumLowBrush"
|
|
BackgroundSource="HostBackdrop"
|
|
FallbackColor="{ThemeResource SystemChromeMediumColor}"
|
|
TintColor="{ThemeResource SystemChromeLowColor}"
|
|
TintOpacity="0.7"/>
|
|
<SolidColorBrush x:Key="EquationBoxPointerOverBackgroundBrush" Color="{ThemeResource SystemControlBackgroundAltMediumBrush}"/>
|
|
<SolidColorBrush x:Key="EquationBoxHoverButtonForegroundBrush" Color="{ThemeResource SystemBaseHighColor}"/>
|
|
</ResourceDictionary>
|
|
<ResourceDictionary x:Key="HighContrast">
|
|
<Thickness x:Key="HighContrastThicknessTop">0,1,0,0</Thickness>
|
|
<x:Double x:Key="HighContrastStrokeThickness">2</x:Double>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundChromeMediumLowBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
|
|
<SolidColorBrush x:Key="TitleBarForegroundBaseHighBrush" Color="{ThemeResource SystemColorCaptionTextColor}"/>
|
|
<SolidColorBrush x:Key="SystemControlBackgroundTransparentBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
|
|
<SolidColorBrush x:Key="SystemControlHighlightTransparentBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
|
|
<SolidColorBrush x:Key="AppBackgroundAltMediumLowBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextBaseMediumHighBrush" Color="{ThemeResource SystemColorWindowTextColor}"/>
|
|
<SolidColorBrush x:Key="AppControlHoverButtonFaceBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPressedButtonFaceBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
|
|
<SolidColorBrush x:Key="AppControlTransparentAccentColorBrush" Color="Transparent"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextBaseHighColorBrush" Color="{ThemeResource SystemColorWindowTextColor}"/>
|
|
<SolidColorBrush x:Key="AppControlPageTextRedColorBrush" Color="{ThemeResource SystemColorWindowTextColor}"/>
|
|
<SolidColorBrush x:Key="AppControlForegroundTransparentRevealBorderBrush" Color="{ThemeResource SystemColorButtonTextColor}"/>
|
|
<SolidColorBrush x:Key="AppControlHighlightAccentRevealBackgroundBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
|
|
<SolidColorBrush x:Key="AppControlBackgroundListAccentHighRevealBackgroundBrush" Color="{ThemeResource SystemColorButtonFaceColor}"/>
|
|
<SolidColorBrush x:Key="AppControlListLowRevealHighlightBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
|
|
<SolidColorBrush x:Key="AppChromeAcrylicHostBackdropMediumLowBrush" Color="{ThemeResource SystemColorWindowColor}"/>
|
|
<SolidColorBrush x:Key="EquationBoxPointerOverBackgroundBrush" Color="{ThemeResource SystemColorHighlightColor}"/>
|
|
<SolidColorBrush x:Key="EquationBoxHoverButtonForegroundBrush" Color="{ThemeResource SystemColorCaptionTextColor}"/>
|
|
</ResourceDictionary>
|
|
</ResourceDictionary.ThemeDictionaries>
|
|
|
|
<!-- Min Window Height/Width -->
|
|
<x:Double x:Key="AppMinWindowHeight">500</x:Double>
|
|
<x:Double x:Key="AppMinWindowWidth">320</x:Double>
|
|
|
|
<FontFamily x:Key="CalculatorFontFamily">ms-appx:///Assets/CalcMDL2.ttf#Calculator MDL2 Assets</FontFamily>
|
|
|
|
<x:Double x:Key="SplitViewOpenPaneLength">256</x:Double>
|
|
<Thickness x:Key="PivotPortraitThemePadding">0,1,0,0</Thickness>
|
|
<x:Double x:Key="PivotHeaderItemFontSize">15</x:Double>
|
|
<FontWeight x:Key="PivotHeaderItemThemeFontWeight">SemiBold</FontWeight>
|
|
|
|
<x:Double x:Key="CaptionFontSize">12</x:Double>
|
|
<x:Double x:Key="BodyFontSize">15</x:Double>
|
|
<x:Double x:Key="TitleFontSize">24</x:Double>
|
|
|
|
<!-- Hamburger button heights -->
|
|
<x:Double x:Key="HamburgerHeight">40</x:Double>
|
|
<GridLength x:Key="HamburgerHeightGridLength">40</GridLength>
|
|
|
|
<x:Double x:Key="CalcButtonCaptionSize">34</x:Double>
|
|
<x:Double x:Key="CalcStandardOperatorCaptionSizeLarge">24</x:Double>
|
|
<!-- Numpad Standard/Scientific in Fill/Full -->
|
|
<x:Double x:Key="CalcStandardOperatorCaptionSize">20</x:Double>
|
|
<!-- Standard Operators Standard/Scientific in Fill/Full -->
|
|
<x:Double x:Key="CalcOperatorCaptionSize">15</x:Double>
|
|
|
|
<!-- Base style for calc buttons -->
|
|
<Style x:Key="CalcButtonStyle" TargetType="Controls:CalculatorButton">
|
|
<Setter Property="MinWidth" Value="24"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="MinHeight" Value="12"/>
|
|
<Setter Property="Margin" Value="1"/>
|
|
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundAltMediumHighBrush}"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="HoverBackground" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
<Setter Property="HoverForeground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Property="PressBackground" Value="{ThemeResource AppControlPressedButtonFaceBrush}"/>
|
|
<Setter Property="PressForeground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="FontSize" Value="{StaticResource CalcButtonCaptionSize}"/>
|
|
<Setter Property="FontWeight" Value="Normal"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Controls:CalculatorButton">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition GeneratedDuration="0"/>
|
|
<VisualTransition From="Normal"
|
|
GeneratedDuration="0:0:0.1"
|
|
To="KeyBoardEntry"/>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{Binding HoverBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Setter Target="ContentPresenter.(ContentPresenter.Foreground)" Value="{Binding HoverForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{Binding PressBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Setter Target="ContentPresenter.(ContentPresenter.Foreground)" Value="{Binding PressForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="KeyBoardEntry"/>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="NumericButtonStyle"
|
|
BasedOn="{StaticResource CalcButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontWeight" Value="SemiBold"/>
|
|
</Style>
|
|
<Style x:Key="NumericButtonStyle12"
|
|
BasedOn="{StaticResource NumericButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontSize" Value="12"/>
|
|
</Style>
|
|
<Style x:Key="NumericButtonStyle18"
|
|
BasedOn="{StaticResource NumericButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontSize" Value="18"/>
|
|
</Style>
|
|
<Style x:Key="NumericButtonStyle24"
|
|
BasedOn="{StaticResource NumericButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontSize" Value="24"/>
|
|
</Style>
|
|
<Style x:Key="NumericButtonStyle28"
|
|
BasedOn="{StaticResource NumericButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontSize" Value="28"/>
|
|
</Style>
|
|
<Style x:Key="NumericButtonStyle34"
|
|
BasedOn="{StaticResource NumericButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontSize" Value="34"/>
|
|
</Style>
|
|
<Style x:Key="NumericButtonStyle46"
|
|
BasedOn="{StaticResource NumericButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontSize" Value="46"/>
|
|
</Style>
|
|
|
|
<Style x:Key="OperatorButtonStyle"
|
|
BasedOn="{StaticResource CalcButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="Background" Value="{ThemeResource AppBackgroundAltMediumLowBrush}"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="FontSize" Value="{StaticResource CalcOperatorCaptionSize}"/>
|
|
</Style>
|
|
|
|
<Style x:Key="SymbolOperatorButtonStyle"
|
|
BasedOn="{StaticResource OperatorButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="FontFamily" Value="{StaticResource CalculatorFontFamily}"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ParenthesisCalcButtonStyle"
|
|
BasedOn="{StaticResource OperatorButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Controls:CalculatorButton">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition GeneratedDuration="0"/>
|
|
<VisualTransition From="Normal"
|
|
GeneratedDuration="0:0:0.1"
|
|
To="KeyBoardEntry"/>
|
|
</VisualStateGroup.Transitions>
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{Binding HoverBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{Binding HoverForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Setter Target="ParenthesisCount.Foreground" Value="{Binding HoverForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{Binding PressBackground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{Binding PressForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Setter Target="ParenthesisCount.Foreground" Value="{Binding PressForeground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ParenthesisCount.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="KeyBoardEntry"/>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
<TextBlock x:Name="ParenthesisCount"
|
|
Margin="18,8,0,-8"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}"
|
|
FontSize="{TemplateBinding MinHeight}"
|
|
FontWeight="SemiBold"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Text="{TemplateBinding Tag}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="AccentCalcButtonStyle"
|
|
BasedOn="{StaticResource SymbolOperatorButtonStyle}"
|
|
TargetType="Controls:CalculatorButton">
|
|
<Setter Property="HoverBackground" Value="{ThemeResource AppControlHighlightAccentRevealBackgroundBrush}"/>
|
|
<Setter Property="HoverForeground" Value="{ThemeResource SystemControlHighlightAltAltHighBrush}"/>
|
|
<Setter Property="PressBackground" Value="{ThemeResource AppControlBackgroundListAccentHighRevealBackgroundBrush}"/>
|
|
<Setter Property="PressForeground" Value="{ThemeResource SystemControlHighlightAltAltHighBrush}"/>
|
|
</Style>
|
|
|
|
<!-- RESULTS -->
|
|
<Style x:Key="ResultsScroller" TargetType="ScrollViewer">
|
|
<Setter Property="HorizontalScrollMode" Value="Disabled"/>
|
|
<Setter Property="VerticalScrollMode" Value="Disabled"/>
|
|
<Setter Property="VerticalScrollBarVisibility" Value="Disabled"/>
|
|
<Setter Property="HorizontalScrollBarVisibility" Value="Disabled"/>
|
|
<Setter Property="IsHitTestVisible" Value="True"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
|
</Style>
|
|
<Style x:Key="ResultsScrollerSnapped"
|
|
BasedOn="{StaticResource ResultsScroller}"
|
|
TargetType="ScrollViewer">
|
|
<Setter Property="HorizontalScrollMode" Value="Enabled"/>
|
|
<Setter Property="HorizontalScrollBarVisibility" Value="Hidden"/>
|
|
<Setter Property="IsHitTestVisible" Value="True"/>
|
|
<Setter Property="ZoomMode" Value="Disabled"/>
|
|
</Style>
|
|
|
|
<Style x:Key="CalculationResultStyle" TargetType="Controls:CalculationResult">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlPageTextBaseHighBrush}"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Right"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Top"/>
|
|
<Setter Property="IsTextScaleFactorEnabled" Value="False"/>
|
|
<Setter Property="UseSystemFocusVisuals" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Controls:CalculationResult">
|
|
<Grid x:Name="Border" Background="{TemplateBinding Background}">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="12"/>
|
|
<ColumnDefinition/>
|
|
<ColumnDefinition Width="12"/>
|
|
</Grid.ColumnDefinitions>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="ActiveStates">
|
|
<VisualState x:Name="Active">
|
|
<VisualState.Setters>
|
|
<Setter Target="NormalOutput.FontWeight" Value="SemiBold"/>
|
|
<Setter Target="NormalOutput.IsTextSelectionEnabled" Value="True"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Normal"/>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<ScrollViewer x:Name="TextContainer"
|
|
Grid.Column="1"
|
|
Padding="0,0,0,0"
|
|
Style="{ThemeResource ResultsScrollerSnapped}"
|
|
AutomationProperties.AccessibilityView="Raw">
|
|
<TextBlock x:Name="NormalOutput"
|
|
Margin="{TemplateBinding DisplayMargin}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="Light"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Text="{TemplateBinding DisplayValue}"
|
|
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
TextWrapping="NoWrap"/>
|
|
</ScrollViewer>
|
|
<HyperlinkButton x:Name="ScrollLeft"
|
|
x:Uid="CalculationResultScrollLeft"
|
|
Grid.Column="0"
|
|
Width="20"
|
|
MinWidth="20"
|
|
MinHeight="24"
|
|
Margin="-4,0,-4,0"
|
|
Padding="0,-3,0,4"
|
|
VerticalAlignment="Top"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Foreground="{ThemeResource SystemControlForegroundAccentBrush}"
|
|
BorderThickness="0"
|
|
AutomationProperties.AutomationId="CalculationResultScrollLeft"
|
|
Visibility="Collapsed">
|
|
<FontIcon x:Name="ScrollLeftText"
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
FontSize="12"
|
|
Glyph=""/>
|
|
</HyperlinkButton>
|
|
<HyperlinkButton x:Name="ScrollRight"
|
|
x:Uid="CalculationResultScrollRight"
|
|
Grid.Column="2"
|
|
Width="20"
|
|
MinWidth="20"
|
|
MinHeight="24"
|
|
Margin="-4,0,-4,0"
|
|
Padding="0,-3,0,4"
|
|
VerticalAlignment="Top"
|
|
HorizontalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Foreground="{ThemeResource SystemControlForegroundAccentBrush}"
|
|
BorderThickness="0"
|
|
AutomationProperties.AutomationId="CalculationResultScrollRight"
|
|
Visibility="Collapsed">
|
|
<FontIcon x:Name="ScrollRightText"
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
FontSize="12"
|
|
Glyph=""/>
|
|
</HyperlinkButton>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="CaptionButtonStyle" TargetType="Button">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundTransparentBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Margin" Value="1"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="MinWidth" Value="32"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="{StaticResource CaptionFontSize}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlPressedButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="SemiBold"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="MemoryHoverButtonStyle"
|
|
BasedOn="{StaticResource CaptionButtonStyle}"
|
|
TargetType="Button">
|
|
<Setter Property="Height" Value="28"/>
|
|
<Setter Property="Width" Value="36"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="AutomationProperties.AccessibilityView" Value="Raw"/>
|
|
<Setter Property="Template">
|
|
<!-- Template copied from CaptionButtonStyle -->
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlHighlightAccentRevealBackgroundBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltAltHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlBackgroundListAccentHighRevealBackgroundBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltAltHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="SemiBold"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="CaptionToggleButtonStyle" TargetType="ToggleButton">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="Background" Value="{ThemeResource AppBackgroundAltMediumLowBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="Margin" Value="1"/>
|
|
<Setter Property="MinWidth" Value="32"/>
|
|
<Setter Property="MinHeight" Value="24"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="{StaticResource CaptionFontSize}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlPressedButtonFaceBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Checked">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Target="SelectionBorder.Background" Value="{ThemeResource SystemControlHighlightTransparentBrush}"/>
|
|
<Setter Target="SelectionBorder.BorderBrush" Value="{ThemeResource SystemControlHighlightAccentBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
<Setter Target="SelectionBorder.Background" Value="{ThemeResource SystemControlHighlightTransparentBrush}"/>
|
|
<Setter Target="SelectionBorder.BorderBrush" Value="{ThemeResource SystemControlHighlightAccentBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlPressedButtonFaceBrush}"/>
|
|
<Setter Target="SelectionBorder.Background" Value="{ThemeResource SystemControlHighlightTransparentBrush}"/>
|
|
<Setter Target="SelectionBorder.BorderBrush" Value="{ThemeResource SystemControlHighlightAccentBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedDisabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="Sizing">
|
|
<VisualState x:Name="NormalSize">
|
|
<VisualState.StateTriggers>
|
|
<AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}" MinWindowWidth="{StaticResource AppMinWindowWidth}"/>
|
|
</VisualState.StateTriggers>
|
|
</VisualState>
|
|
<VisualState x:Name="SmallSize">
|
|
<VisualState.StateTriggers>
|
|
<AdaptiveTrigger MinWindowHeight="0" MinWindowWidth="0"/>
|
|
</VisualState.StateTriggers>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Border x:Name="SelectionBorder" BorderThickness="0,0,0,2"/>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="CaptionToggleButtonSmallStyle"
|
|
BasedOn="{StaticResource CaptionToggleButtonStyle}"
|
|
TargetType="ToggleButton">
|
|
<Setter Property="MinWidth" Value="0"/>
|
|
<Setter Property="MinHeight" Value="0"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ProgWordSizeButtonStyle"
|
|
BasedOn="{StaticResource CaptionButtonStyle}"
|
|
TargetType="Button">
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="MinWidth" Value="80"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlPressedButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="SemiBold"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="ProgKeypadRadioButtonStyle" TargetType="RadioButton">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundTransparentBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Padding" Value="0,0,0,-2"/>
|
|
<Setter Property="Margin" Value="1"/>
|
|
<Setter Property="MinWidth" Value="32"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="FontFamily" Value="{StaticResource CalculatorFontFamily}"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RadioButton">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="Layout">
|
|
<VisualState x:Name="MinSizeLayout">
|
|
<VisualState.StateTriggers>
|
|
<AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}" MinWindowWidth="{StaticResource AppMinWindowWidth}"/>
|
|
</VisualState.StateTriggers>
|
|
</VisualState>
|
|
<VisualState x:Name="DefaultLayout">
|
|
<VisualState.StateTriggers>
|
|
<AdaptiveTrigger MinWindowHeight="0" MinWindowWidth="0"/>
|
|
</VisualState.StateTriggers>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlPressedButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseMediumLowBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Checked">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlHighlightTransparentBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltAccentBrush}"/>
|
|
<Setter Target="Carrot.Opacity" Value="1"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseMediumBrush}"/>
|
|
<Setter Target="Carrot.Opacity" Value="1"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="Red"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlForegroundBaseMediumLowBrush}"/>
|
|
<Setter Target="Carrot.Opacity" Value="1"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedDisabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlHighlightTransparentBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAccentBrush}"/>
|
|
<Setter Target="Carrot.Visibility" Value="Visible"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Rectangle x:Name="Carrot"
|
|
Grid.Row="1"
|
|
Height="2"
|
|
VerticalAlignment="Bottom"
|
|
Fill="{ThemeResource SystemControlHighlightAccentBrush}"
|
|
StrokeThickness="0"
|
|
Opacity="0"/>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="SquareIconButtonStyle" TargetType="Button">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundTransparentBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Margin" Value="0"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="Width" Value="{StaticResource HamburgerHeight}"/>
|
|
<Setter Property="Height" Value="{StaticResource HamburgerHeight}"/>
|
|
<Setter Property="MinHeight" Value="16"/>
|
|
<Setter Property="MinWidth" Value="16"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="FontFamily" Value="{StaticResource CalculatorFontFamily}"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlHoverButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource AppControlPressedButtonFaceBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="HistoryButtonStyle"
|
|
BasedOn="{StaticResource SquareIconButtonStyle}"
|
|
TargetType="Button">
|
|
<Setter Property="VerticalAlignment" Value="Top"/>
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
<Setter Property="Padding" Value="1,0,-1,0"/>
|
|
</Style>
|
|
|
|
<Style x:Key="ClearAllHistoryMemoryButtonStyle"
|
|
BasedOn="{StaticResource SquareIconButtonStyle}"
|
|
TargetType="Button">
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="HorizontalAlignment" Value="Right"/>
|
|
<Setter Property="Margin" Value="0,4,0,0"/>
|
|
<Setter Property="Padding" Value="1,0,-1,0"/>
|
|
<Setter Property="FontSize" Value="18"/>
|
|
</Style>
|
|
|
|
<Style x:Key="PathFakeButtonStyle" TargetType="Button">
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundTransparentBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="Margin" Value="1"/>
|
|
<Setter Property="Padding" Value="0"/>
|
|
<Setter Property="MinWidth" Value="32"/>
|
|
<Setter Property="MinHeight" Value="24"/>
|
|
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalAlignment" Value="Stretch"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid x:Name="RootGrid" Background="{TemplateBinding Background}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="PointerOver"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="RootGrid.(RevealBrush.State)" Value="Pressed"/>
|
|
<Setter Target="RootGrid.Background" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Disabled">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlDisabledBaseLowBrush}"/>
|
|
<Setter Target="ContentPresenter.BorderThickness" Value="0"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Padding="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalAlignment}"
|
|
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
BorderBrush="{ThemeResource AppControlForegroundTransparentRevealBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}">
|
|
<ContentPresenter.Content>
|
|
<PathIcon AutomationProperties.AccessibilityView="Raw" Data="{TemplateBinding Content}"/>
|
|
</ContentPresenter.Content>
|
|
</ContentPresenter>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="HistoryMemoryItemContainerStyle" TargetType="ListViewItem">
|
|
<Setter Property="Background" Value="{ThemeResource SystemControlBackgroundTransparentBrush}"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}"/>
|
|
<Setter Property="TabNavigation" Value="Local"/>
|
|
<Setter Property="Padding" Value="2,0,12,0"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="MinWidth" Value="{ThemeResource ListViewItemMinWidth}"/>
|
|
<Setter Property="MinHeight" Value="{ThemeResource ListViewItemMinHeight}"/>
|
|
<Setter Property="UseSystemFocusVisuals" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListViewItem">
|
|
<Grid x:Name="ContentBorder"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
<VisualState x:Name="PointerOver">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Target="BorderBackground.Opacity" Value="1"/>
|
|
<Setter Target="BorderBackground.Fill" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
|
|
<Setter Target="BorderBackground.Stroke" Value="{ThemeResource SystemControlHighlightListLowBrush}"/>
|
|
</VisualState.Setters>
|
|
</VisualState>
|
|
<VisualState x:Name="Pressed">
|
|
<VisualState.Setters>
|
|
<Setter Target="ContentPresenter.Foreground" Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}"/>
|
|
<Setter Target="BorderBackground.Opacity" Value="1"/>
|
|
<Setter Target="BorderBackground.Fill" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
|
|
<Setter Target="BorderBackground.Stroke" Value="{ThemeResource SystemControlHighlightListMediumBrush}"/>
|
|
</VisualState.Setters>
|
|
<Storyboard>
|
|
<PointerDownThemeAnimation TargetName="ContentPresenter"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Selected"/>
|
|
<VisualState x:Name="PointerOverSelected"/>
|
|
<VisualState x:Name="PressedSelected"/>
|
|
<VisualStateGroup.Transitions>
|
|
<VisualTransition From="Pressed" To="Normal">
|
|
<Storyboard>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter"/>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
<VisualTransition From="Pressed" To="PointerOverSelected">
|
|
<Storyboard>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="ContentPresenter"/>
|
|
</Storyboard>
|
|
</VisualTransition>
|
|
</VisualStateGroup.Transitions>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<Rectangle x:Name="BorderBackground"
|
|
Fill="Transparent"
|
|
StrokeThickness="{ThemeResource HighContrastStrokeThickness}"
|
|
Opacity="0"
|
|
IsHitTestVisible="False"/>
|
|
<Grid x:Name="ContentPresenterGrid"
|
|
Margin="0,0,0,0"
|
|
Background="Transparent">
|
|
<Grid.RenderTransform>
|
|
<TranslateTransform x:Name="ContentPresenterTranslateTransform"/>
|
|
</Grid.RenderTransform>
|
|
<ContentPresenter x:Name="ContentPresenter"
|
|
Margin="{TemplateBinding Padding}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
Content="{TemplateBinding Content}"
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
ContentTransitions="{TemplateBinding ContentTransitions}"/>
|
|
</Grid>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="EquationTextBoxStyle" TargetType="Controls:EquationTextBox">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="0,1,1,1"/>
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
|
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
|
|
<Setter Property="FontWeight" Value="Normal"/>
|
|
<Setter Property="Foreground" Value="{ThemeResource TextBoxForegroundThemeBrush}"/>
|
|
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}"/>
|
|
<Setter Property="IsTabStop" Value="False"/>
|
|
<Setter Property="Typography.StylisticSet20" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Controls:EquationTextBox">
|
|
<Grid>
|
|
|
|
<Grid.Resources>
|
|
<Style x:Name="EquationTextBoxButtonStyle" TargetType="Button">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="Transparent"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="Button">
|
|
<Grid x:Name="ButtonLayoutGrid"
|
|
Background="Transparent"
|
|
BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0"
|
|
Storyboard.TargetName="ButtonLayoutGrid"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="0"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<TextBlock x:Name="GlyphElement"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource EquationBoxHoverButtonForegroundBrush}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="12"
|
|
FontStyle="Normal"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Text="{TemplateBinding Content}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Name="EquationTextBoxToggleButtonStyle" TargetType="ToggleButton">
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="Foreground" Value="Transparent"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ToggleButton">
|
|
<Grid x:Name="ButtonLayoutGrid"
|
|
Background="Transparent"
|
|
BorderBrush="{ThemeResource TextControlButtonBorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal"/>
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Pressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonBorderBrushPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<DoubleAnimation Duration="0"
|
|
Storyboard.TargetName="ButtonLayoutGrid"
|
|
Storyboard.TargetProperty="Opacity"
|
|
To="0"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Checked">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushChecked}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="ButtonLayoutGrid"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedPointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="ButtonLayoutGrid"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedPressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlButtonForegroundPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedPressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerDownThemeAnimation Storyboard.TargetName="ButtonLayoutGrid"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="CheckedDisabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundCheckedDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundCheckedDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushCheckedDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Indeterminate">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminate}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminate}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminate}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="ButtonLayoutGrid"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="IndeterminatePointerOver">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminatePointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminatePointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminatePointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerUpThemeAnimation Storyboard.TargetName="ButtonLayoutGrid"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="IndeterminatePressed">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminatePressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminatePressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminatePressed}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<PointerDownThemeAnimation Storyboard.TargetName="ButtonLayoutGrid"/>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="IndeterminateDisabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBackgroundIndeterminateDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="GlyphElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonForegroundIndeterminateDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ButtonLayoutGrid" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ToggleButtonBorderBrushIndeterminateDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
<TextBlock x:Name="GlyphElement"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource EquationBoxHoverButtonForegroundBrush}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="12"
|
|
FontStyle="Normal"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Text="{TemplateBinding Content}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
<Style x:Key="EquationTextBoxStyle" TargetType="RichEditBox">
|
|
<Setter Property="Foreground" Value="{ThemeResource TextControlForeground}"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="ContentLinkForegroundColor" Value="{ThemeResource ContentLinkForegroundColor}"/>
|
|
<Setter Property="ContentLinkBackgroundColor" Value="{ThemeResource ContentLinkBackgroundColor}"/>
|
|
<Setter Property="SelectionHighlightColor" Value="{ThemeResource TextControlSelectionHighlightColor}"/>
|
|
<Setter Property="BorderBrush" Value="{ThemeResource TextControlBorderBrush}"/>
|
|
<Setter Property="BorderThickness" Value="{ThemeResource TextControlBorderThemeThickness}"/>
|
|
<Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}"/>
|
|
<Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollMode" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto"/>
|
|
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
|
|
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
|
|
<Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False"/>
|
|
<Setter Property="Padding" Value="{ThemeResource TextControlThemePadding}"/>
|
|
<Setter Property="UseSystemFocusVisuals" Value="{ThemeResource IsApplicationFocusVisualKindReveal}"/>
|
|
<Setter Property="ContextFlyout" Value="{StaticResource TextControlCommandBarContextFlyout}"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="RichEditBox">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
|
|
<VisualState x:Name="Disabled">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlHeaderForegroundDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackgroundDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlPlaceholderForegroundDisabled}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Normal"/>
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushPointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlPlaceholderForegroundPointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundPointerOver}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="Focused">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextContentPresenter" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlPlaceholderForegroundFocused}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="BorderElement" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBorderBrushFocused}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="Foreground">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlForegroundFocused}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentElement" Storyboard.TargetProperty="RequestedTheme">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Light"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
</VisualStateGroup>
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<ContentPresenter x:Name="HeaderContentPresenter"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Margin="{ThemeResource RichEditBoxTopHeaderMargin}"
|
|
VerticalAlignment="Top"
|
|
Foreground="{ThemeResource TextControlHeaderForeground}"
|
|
FontWeight="Normal"
|
|
x:DeferLoadStrategy="Lazy"
|
|
Content="{TemplateBinding Header}"
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
TextWrapping="Wrap"
|
|
Visibility="Collapsed"/>
|
|
<Border x:Name="BorderElement"
|
|
Grid.Row="1"
|
|
Grid.RowSpan="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
MinWidth="{ThemeResource TextControlThemeMinWidth}"
|
|
MinHeight="{ThemeResource TextControlThemeMinHeight}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
Control.IsTemplateFocusTarget="True"
|
|
CornerRadius="{TemplateBinding CornerRadius}"/>
|
|
<ScrollViewer x:Name="ContentElement"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
VerticalAlignment="Center"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
|
|
HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
|
|
IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
|
|
IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
|
|
IsTabStop="False"
|
|
IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
|
|
VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
|
|
VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
|
|
ZoomMode="Disabled"/>
|
|
<TextBlock x:Name="PlaceholderTextContentPresenter"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Margin="{TemplateBinding BorderThickness}"
|
|
Padding="{TemplateBinding Padding}"
|
|
VerticalAlignment="Center"
|
|
Foreground="{ThemeResource TextControlPlaceholderForeground}"
|
|
IsHitTestVisible="False"
|
|
Text="{TemplateBinding PlaceholderText}"
|
|
TextAlignment="{TemplateBinding TextAlignment}"
|
|
TextWrapping="{TemplateBinding TextWrapping}"/>
|
|
<ContentPresenter x:Name="DescriptionPresenter"
|
|
Grid.Row="2"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="4"
|
|
Foreground="{ThemeResource SystemControlDescriptionTextForegroundBrush}"
|
|
x:Load="False"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding Description}"/>
|
|
|
|
</Grid>
|
|
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Grid.Resources>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition MinHeight="44"/>
|
|
<RowDefinition Height="Auto"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<VisualStateManager.VisualStateGroups>
|
|
<VisualStateGroup x:Name="CommonStates">
|
|
<VisualState x:Name="Normal">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackground}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="PointerOver">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextControlBackground}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=EquationColor}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ColorChooserButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="FunctionButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="RemoveButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Disabled">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxDisabledBorderThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationTextBox" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="Transparent"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
|
|
<VisualState x:Name="Focused">
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="BorderBrush">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=EquationColor}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="EquationBoxBorder" Storyboard.TargetProperty="Background">
|
|
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource TextBoxBackgroundThemeBrush}"/>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
</VisualStateGroup>
|
|
|
|
<VisualStateGroup x:Name="ButtonStates">
|
|
<VisualState x:Name="ButtonVisible">
|
|
|
|
<Storyboard>
|
|
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="DeleteButton" Storyboard.TargetProperty="Visibility">
|
|
<DiscreteObjectKeyFrame KeyTime="0">
|
|
<DiscreteObjectKeyFrame.Value>
|
|
<Visibility>Visible</Visibility>
|
|
</DiscreteObjectKeyFrame.Value>
|
|
</DiscreteObjectKeyFrame>
|
|
</ObjectAnimationUsingKeyFrames>
|
|
</Storyboard>
|
|
</VisualState>
|
|
<VisualState x:Name="ButtonCollapsed"/>
|
|
</VisualStateGroup>
|
|
|
|
</VisualStateManager.VisualStateGroups>
|
|
|
|
<Button x:Name="EquationButton"
|
|
MinWidth="44"
|
|
MinHeight="44"
|
|
Background="{TemplateBinding EquationColor}"
|
|
Foreground="{StaticResource SystemChromeWhiteColor}"
|
|
Content="ƒₓ">
|
|
<Button.Resources>
|
|
<SolidColorBrush x:Name="ButtonBackgroundPointerOver" Color="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=EquationColor.Color}"/>
|
|
<SolidColorBrush x:Name="ButtonForegroundPointerOver" Color="{ThemeResource SystemChromeWhiteColor}"/>
|
|
<SolidColorBrush x:Name="ButtonBorderBrushPointerOver" Color="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=EquationColor.Color}"/>
|
|
</Button.Resources>
|
|
</Button>
|
|
<Border x:Name="EquationBoxBorder"
|
|
Grid.Column="1"
|
|
Background="{ThemeResource TextControlBackground}"
|
|
BorderBrush="{TemplateBinding Background}"
|
|
BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<RichEditBox x:Name="EquationTextBox"
|
|
MinHeight="42"
|
|
Padding="{TemplateBinding Padding}"
|
|
VerticalAlignment="Stretch"
|
|
Style="{StaticResource EquationTextBoxStyle}"
|
|
BorderThickness="0"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
AcceptsReturn="false"
|
|
InputScope="Text"
|
|
MaxLength="2048"
|
|
TextWrapping="NoWrap"/>
|
|
<!-- TODO: Consider overwiting the hover color instead of hijacking the foreground/background property -->
|
|
<Button x:Name="DeleteButton"
|
|
Grid.Column="3"
|
|
MinWidth="34"
|
|
Margin="{ThemeResource HelperButtonThemePadding}"
|
|
VerticalAlignment="Stretch"
|
|
Style="{StaticResource EquationTextBoxButtonStyle}"
|
|
Background="{TemplateBinding EquationColor}"
|
|
Foreground="{TemplateBinding EquationColor}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content=""
|
|
IsTabStop="False"
|
|
Visibility="Collapsed"/>
|
|
<Button x:Name="RemoveButton"
|
|
Grid.Column="3"
|
|
MinWidth="34"
|
|
Margin="{ThemeResource HelperButtonThemePadding}"
|
|
VerticalAlignment="Stretch"
|
|
Style="{StaticResource EquationTextBoxButtonStyle}"
|
|
Background="{TemplateBinding EquationColor}"
|
|
Foreground="{TemplateBinding EquationColor}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content=""
|
|
IsTabStop="False"
|
|
Visibility="Collapsed"/>
|
|
<ToggleButton x:Name="ColorChooserButton"
|
|
Grid.Column="2"
|
|
MinWidth="34"
|
|
Margin="{ThemeResource HelperButtonThemePadding}"
|
|
VerticalAlignment="Stretch"
|
|
Style="{StaticResource EquationTextBoxToggleButtonStyle}"
|
|
Background="{TemplateBinding EquationColor}"
|
|
Foreground="{TemplateBinding EquationColor}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontFamily="{ThemeResource SymbolThemeFontFamily}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content=""
|
|
IsTabStop="False"
|
|
Visibility="Collapsed"/>
|
|
<Button x:Name="FunctionButton"
|
|
Grid.Column="1"
|
|
MinWidth="34"
|
|
Margin="{ThemeResource HelperButtonThemePadding}"
|
|
VerticalAlignment="Stretch"
|
|
Style="{StaticResource EquationTextBoxButtonStyle}"
|
|
Background="{TemplateBinding EquationColor}"
|
|
Foreground="{TemplateBinding EquationColor}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="ƒₓ"
|
|
IsTabStop="False"
|
|
Visibility="Collapsed"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<ContentPresenter x:Name="KeyGraphFeaturesContentPresenter"
|
|
Grid.Row="1"
|
|
Grid.Column="0"
|
|
Grid.ColumnSpan="2"
|
|
AutomationProperties.AccessibilityView="Raw"
|
|
Content="{TemplateBinding KeyGraphFeaturesContent}"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="VariableTextBoxStyle" TargetType="TextBox">
|
|
<Setter Property="Margin" Value="12,4,4,4"/>
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="AcceptsReturn" Value="False"/>
|
|
<Setter Property="InputScope" Value="Number"/>
|
|
<Setter Property="TextWrapping" Value="NoWrap"/>
|
|
</Style>
|
|
</ResourceDictionary>
|
|
</Application.Resources>
|
|
</Application>
|