2026-01-26 18:56:53 +09:00

357 lines
23 KiB
XML

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:usercontrols="clr-namespace:AuroraUIComponent.UserControls">
<!-- defaultToggleButton : AuroraVision에서 사용 -->
<Style x:Key="defaultToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ThemeForeground}" />
<Setter Property="Background" Value="{DynamicResource BMSDarkGray}" />
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.Border}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="Margin" Value="2"/>
<Setter Property="Padding" Value="1 5"/>
<Setter Property="mah:ControlsHelper.CornerRadius" Value="0"/>
<!--<Setter Property="SnapsToDevicePixels" Value="True" />-->
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<mah:ClipBorder Grid.Column="1" Name="Border" Margin="0" Padding="5 0" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.CornerRadius)}">
<ContentControl>
<mah:ContentControlEx Grid.Column="1" Name="PART_ContentPresenter" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
ContentCharacterCasing="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.ContentCharacterCasing)}" />
</ContentControl>
</mah:ClipBorder>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="mah:ControlsHelper.FocusBorderThickness" Value="1"/>
<Style.Triggers>
<!-- Disabled, UnChecked, Pressed : 공통 -->
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.IdealForegroundDisabled}"/>
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.Gray3}"/>
</Trigger>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ACLightBlueDeep}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ACLightBlueSemiLight}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACLightBlueLight}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- 통일감을 위해, StToggleButtonAccentXXX (Color) 들은 StToggleButtonAccent을 Base로 Background/BorderBrush 색상만 바꿔서 사용해 주세요 -->
<Style x:Key="StToggleButtonAccent" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource defaultToggleButton}">
<Setter Property="Background" Value="{DynamicResource ACLightBlueNormal}" />
<Setter Property="BorderBrush" Value="{DynamicResource ACLightBlueBorder}" />
<Setter Property="Foreground" Value="{DynamicResource TransparentWhite}" />
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ACLightBlueDeep}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ACLightBlueSemiLight}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACLightBlueLight}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- 통일감을 위해, StToggleButtonAccentXXX (Color) 들은 StToggleButtonAccent을 Base로 Background/BorderBrush 색상만 바꿔서 사용해 주세요 -->
<Style x:Key="StToggleButtonAccentPurple" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonAccent}">
<Setter Property="Background" Value="{DynamicResource ACPurpleNormal}" />
<Setter Property="BorderBrush" Value="{DynamicResource ACPurpleBorder}" />
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ACPurpleDeep}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ACPurpleSemiLight}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACPurpleLight}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- 통일감을 위해, StToggleButtonAccentXXX (Color) 들은 StToggleButtonAccent을 Base로 Background/BorderBrush 색상만 바꿔서 사용해 주세요 -->
<Style x:Key="StToggleButtonAccentBlue" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonAccent}">
<Setter Property="Background" Value="{DynamicResource ACBlueNormal}" />
<Setter Property="BorderBrush" Value="{DynamicResource ACBlueBorder}" />
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ACBlueDeep}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACBlueSemiLight}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ACBlueLight}" />
</Trigger>
</Style.Triggers>
</Style>
<!-- 통일감을 위해, StToggleButtonAccentXXX (Color) 들은 StToggleButtonAccent을 Base로 Background/BorderBrush 색상만 바꿔서 사용해 주세요 -->
<Style x:Key="StToggleButtonAccentRed" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonAccent}">
<Setter Property="Background" Value="{DynamicResource ACRedNormal}" />
<Setter Property="BorderBrush" Value="{DynamicResource ACRedBorder}" />
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedDeep}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedSemiLight}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedLight}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="StToggleButtonGray" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonAccent}">
<Setter Property="Background" Value="{DynamicResource ACGrayNormal}" />
<Setter Property="BorderBrush" Value="{DynamicResource ACGrayBorder}" />
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ACGrayDeep}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACGraySemiLight}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ACGrayLight}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="StToggleButtonLed" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonGray}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}" Padding="{TemplateBinding Padding}">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
VerticalAlignment="Center">
<usercontrols:UCLedLight LedStatusVal="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=ToggleButton}}" Width="20"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ContentPresenter Margin="5 0 0 0" Content="{Binding Content, RelativeSource={RelativeSource AncestorType=ToggleButton}}"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="StToggleButtonAccentLedRound" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonAccent}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="5"
Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}" Padding="{TemplateBinding Padding}">
<StackPanel Orientation="Horizontal"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
VerticalAlignment="Center">
<usercontrols:UCLedLight LedStatusVal="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=ToggleButton}}" Width="20"
HorizontalAlignment="Center" VerticalAlignment="Center"/>
<ContentPresenter Margin="5 0 0 0" Content="{Binding Content, RelativeSource={RelativeSource AncestorType=ToggleButton}}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center"/>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="StToggleButtonAccentLed" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonAccent}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" Margin="{TemplateBinding Margin}" Padding="{TemplateBinding Padding}">
<StackPanel HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Orientation="Horizontal" VerticalAlignment="Center">
<usercontrols:UCLedLight LedStatusVal="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=ToggleButton}}" Width="20"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center"/>
<ContentPresenter Margin="5 0 0 0" Content="{Binding Content, RelativeSource={RelativeSource AncestorType=ToggleButton}}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="Center"/>
</StackPanel>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="StToggleButtonLedRed" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonLed}">
<Setter Property="Background" Value="{DynamicResource ACRedNormal}" />
<Setter Property="BorderBrush" Value="{DynamicResource ACRedBorder}" />
<Style.Triggers>
<!-- Enable 또는 Check 상태일 때 색상 : 버튼별로 차이 -->
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedDeep}" />
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedSemiLight}" />
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Background" Value="{DynamicResource ACRedLight}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="StToggleButtonCheckBox" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggleButtonGray}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<CheckBox IsChecked="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=ToggleButton}}" Style="{DynamicResource StCheckBoxToggleButton}"
IsEnabled="{TemplateBinding IsEnabled}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0 0 5 0"/>
<mah:ClipBorder Grid.Column="1" Name="Border" Margin="0" Padding="5 0" Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
<ContentControl>
<mah:ContentControlEx Grid.Column="1" Name="PART_ContentPresenter" Padding="{TemplateBinding Padding}"
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
ContentCharacterCasing="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(mah:ControlsHelper.ContentCharacterCasing)}" />
</ContentControl>
</mah:ClipBorder>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="StToggle1" TargetType="{x:Type ToggleButton}">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Foreground}"/>
<Setter Property="FontWeight" Value="Normal" />
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Background.Normal}" />
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="border"
CornerRadius="8"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
Padding="{TemplateBinding Padding}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource MahApps.Brushes.BackgroundSelected}" />
<Setter TargetName="border" Property="BorderBrush" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ForegroundSelected}" />
<Setter Property="FontWeight" Value="Bold" />
</Trigger>
<Trigger Property="IsChecked" Value="False">
<Setter Property="FontWeight" Value="Normal" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="border" Property="Background" Value="{DynamicResource MahApps.Brushes.BackgroundHighlighted}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ForegroundSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="border" Property="Background" Value="{DynamicResource MahApps.Brushes.BackgroundHighlighted}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ForegroundSelected}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="StToggle2" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource StToggle1}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border x:Name="border"
CornerRadius="8"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}" Padding="{TemplateBinding Padding}"
BorderThickness="{TemplateBinding BorderThickness}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="border" Property="Background" Value="{DynamicResource BSGLavenderBlue}" />
<Setter TargetName="border" Property="BorderBrush" Value="Transparent" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ForegroundSelected}" />
<Setter Property="FontWeight" Value="Bold" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="True" />
</MultiTrigger.Conditions>
<Setter TargetName="border" Property="Background" Value="{DynamicResource MahApps.Brushes.BackgroundHighlighted}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ForegroundSelected}" />
</MultiTrigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="False" />
</MultiTrigger.Conditions>
<Setter TargetName="border" Property="Background" Value="{DynamicResource MahApps.Brushes.BackgroundHighlighted}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ForegroundSelected}" />
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>