2026-01-26 14:51:28 +09:00

162 lines
10 KiB
XML

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<!--Visual Studio Design Time에만 적용할 리소스를 정의한다.
따라서 이벤트 정의 없이 Look&Feel만 보는 스타일 정의-->
<SolidColorBrush
x:Key="langTokens"/>
<Style
TargetType="{x:Type Button}">
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Background.Normal}" />
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.Button.Border}"/>
<Setter Property="Height" Value="Auto"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{DynamicResource Aurora.DefaultCornerRadius}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}">
<ContentPresenter
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style
TargetType="{x:Type ToggleButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ToggleButton">
<Border Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
CornerRadius="{DynamicResource Aurora.DefaultCornerRadius}"
VerticalAlignment="{TemplateBinding VerticalAlignment}"
HorizontalAlignment="{TemplateBinding HorizontalAlignment}">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}" RecognizesAccessKey="True"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.Background.Normal}" />
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.Foreground}" />
<Setter Property="BorderBrush" Value="{DynamicResource MahApps.Brushes.SemiTransparent}"/>
<Setter Property="BorderThickness" Value="{DynamicResource Aurora.Button.Border.Selected.Thickness}"/>
<Setter Property="FontFamily" Value="{DynamicResource MahApps.Fonts.Family.Button}"/>
<Setter Property="FontSize" Value="{DynamicResource MahApps.Font.Size.Button}"/>
</Style>
<Style x:Key="MahApps.Styles.DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}"/>
<SolidColorBrush x:Key="WindowBackgroundBrush" Color="#FF252525" />
<ControlTemplate x:Key="ComboBoxToggleButton" TargetType="ToggleButton">
<Grid Background="#FF252525">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="20" />
</Grid.ColumnDefinitions>
<Border x:Name="Border" Grid.ColumnSpan="2" CornerRadius="0" BorderThickness="1" />
<Border Grid.Column="0" CornerRadius="2,0,0,2" Margin="0" Background="#FF252525" BorderThickness="0,0,1,0" />
<Path x:Name="Arrow" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 8 0 Z" Fill="White"/>
</Grid>
</ControlTemplate>
<ControlTemplate x:Key="ComboBoxTextBox" TargetType="TextBox">
<Border x:Name="PART_ContentHost" Focusable="False" Background="{TemplateBinding Background}" />
</ControlTemplate>
<Style x:Key="{x:Type ComboBox}" TargetType="ComboBox" BasedOn="{StaticResource {x:Type ComboBox}}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<Grid>
<ToggleButton Name="ToggleButton" Template="{StaticResource ComboBoxToggleButton}" Grid.Column="2" Focusable="false"
IsChecked="{Binding Path=IsDropDownOpen,Mode=TwoWay,RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press">
</ToggleButton>
<ContentPresenter Name="ContentSite" IsHitTestVisible="False" Margin="3,3,23,3" VerticalAlignment="Center" HorizontalAlignment="Left" />
<TextBox x:Name="PART_EditableTextBox" Style="{x:Null}" Template="{StaticResource ComboBoxTextBox}" HorizontalAlignment="Left" VerticalAlignment="Center"
Margin="3,3,23,3"
Focusable="True"
Background="Transparent"
Visibility="Hidden"
IsReadOnly="{TemplateBinding IsReadOnly}"/>
<Popup
Name="Popup"
Placement="Bottom"
IsOpen="{TemplateBinding IsDropDownOpen}"
AllowsTransparency="True"
Focusable="False"
PopupAnimation="Slide">
<Grid
Name="DropDown"
SnapsToDevicePixels="True"
MinWidth="{TemplateBinding ActualWidth}"
MaxHeight="{TemplateBinding MaxDropDownHeight}">
<Border x:Name="DropDownBorder" Background="{StaticResource WindowBackgroundBrush}" BorderThickness="0.1"/>
<ScrollViewer Margin="4,6,4,6" SnapsToDevicePixels="True">
<StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" />
</ScrollViewer>
</Grid>
</Popup>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style TargetType="TabControl" BasedOn="{StaticResource {x:Type TabControl}}">
<Setter Property="Background" Value="{DynamicResource Aurora.Brushes.TabControl.Background}"/>
<Setter Property="BorderBrush" Value="{DynamicResource Aurora.Brushes.TabControl.BorderBrush}" />
<Setter Property="BorderThickness" Value="1" />
<Style.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ThemeForeground}"/>
</Style>
</Style.Resources>
</Style>
<Style TargetType="TabItem" BasedOn="{StaticResource {x:Type TabItem}}">
<Setter Property="Background" Value="{DynamicResource Aurora.Brushes.TabItem.Background}"/>
<Setter Property="Foreground" Value="{DynamicResource Aurora.Brushes.TabItem.Foreground}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabItem}">
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" MinWidth="70" Width="auto" MaxWidth="300" Height="26" Margin="0 0 5 0">
<Border x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
Background="{TemplateBinding Background}" Margin="0" CornerRadius="5,5,0,0" />
<ContentPresenter x:Name="contentPresenter" ContentSource="Header" Focusable="False" Margin="10 2"
HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
</Grid>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="False">
<Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource Aurora.Brushes.TabItem.Background.Normal}"/>
</DataTrigger>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource Self}}" Value="True">
<Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource MahApps.Brushes.BackgroundSelected}"/>
<Setter Property="Foreground" Value="{DynamicResource Aurora.Brushes.TabItem.Foreground.Selected}"/>
</DataTrigger>
<Trigger SourceName="templateRoot" Property="IsMouseOver" Value="True">
<Setter Property="Background" TargetName="mainBorder" Value="{DynamicResource MahApps.Brushes.BackgroundHighlighted}"/>
<Setter Property="Foreground" Value="Black"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>