|
|
|
<Application
|
|
|
|
x:Class="DiscordChatExporter.Gui.App"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:local="clr-namespace:DiscordChatExporter.Gui"
|
|
|
|
xmlns:s="https://github.com/canton7/Stylet">
|
|
|
|
<Application.Resources>
|
|
|
|
<s:ApplicationLoader>
|
|
|
|
<!-- Bootstrapper -->
|
|
|
|
<s:ApplicationLoader.Bootstrapper>
|
|
|
|
<local:Bootstrapper />
|
|
|
|
</s:ApplicationLoader.Bootstrapper>
|
|
|
|
|
|
|
|
<!-- Merged dictionaries -->
|
|
|
|
<ResourceDictionary.MergedDictionaries>
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
|
|
|
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
|
|
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
|
|
|
|
<!-- Colors -->
|
|
|
|
<Color x:Key="PrimaryColor">#343838</Color>
|
|
|
|
<Color x:Key="PrimaryLightColor">#5E6262</Color>
|
|
|
|
<Color x:Key="PrimaryDarkColor">#0D1212</Color>
|
|
|
|
<Color x:Key="AccentColor">#F9A825</Color>
|
|
|
|
<Color x:Key="AccentDarkColor">#C17900</Color>
|
|
|
|
<Color x:Key="TextColor">#000000</Color>
|
|
|
|
<Color x:Key="InverseTextColor">#FFFFFF</Color>
|
|
|
|
|
|
|
|
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="{DynamicResource PrimaryLightColor}" />
|
|
|
|
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="{DynamicResource InverseTextColor}" />
|
|
|
|
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="{DynamicResource PrimaryColor}" />
|
|
|
|
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="{DynamicResource InverseTextColor}" />
|
|
|
|
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="{DynamicResource PrimaryDarkColor}" />
|
|
|
|
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="{DynamicResource InverseTextColor}" />
|
|
|
|
<SolidColorBrush x:Key="SecondaryAccentBrush" Color="{DynamicResource AccentColor}" />
|
|
|
|
<SolidColorBrush x:Key="SecondaryAccentForegroundBrush" Color="{DynamicResource TextColor}" />
|
|
|
|
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="PrimaryTextBrush"
|
|
|
|
Opacity="0.87"
|
|
|
|
Color="{DynamicResource TextColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="SecondaryTextBrush"
|
|
|
|
Opacity="0.64"
|
|
|
|
Color="{DynamicResource TextColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="DimTextBrush"
|
|
|
|
Opacity="0.45"
|
|
|
|
Color="{DynamicResource TextColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="PrimaryInverseTextBrush"
|
|
|
|
Opacity="1"
|
|
|
|
Color="{DynamicResource InverseTextColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="SecondaryInverseTextBrush"
|
|
|
|
Opacity="0.7"
|
|
|
|
Color="{DynamicResource InverseTextColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="DimInverseTextBrush"
|
|
|
|
Opacity="0.52"
|
|
|
|
Color="{DynamicResource InverseTextColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="AccentTextBrush"
|
|
|
|
Opacity="1"
|
|
|
|
Color="{DynamicResource AccentColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="AccentDarkTextBrush"
|
|
|
|
Opacity="1"
|
|
|
|
Color="{DynamicResource AccentDarkColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="DividerBrush"
|
|
|
|
Opacity="0.12"
|
|
|
|
Color="{DynamicResource TextColor}" />
|
|
|
|
<SolidColorBrush
|
|
|
|
x:Key="InverseDividerBrush"
|
|
|
|
Opacity="0.12"
|
|
|
|
Color="{DynamicResource InverseTextColor}" />
|
|
|
|
|
|
|
|
<!-- Styles -->
|
|
|
|
<Style x:Key="MaterialDesignRoot" TargetType="{x:Type Control}">
|
|
|
|
<Setter Property="FontFamily" Value="{DynamicResource MaterialDesignFont}" />
|
|
|
|
<Setter Property="RenderOptions.BitmapScalingMode" Value="HighQuality" />
|
|
|
|
<Setter Property="SnapsToDevicePixels" Value="True" />
|
|
|
|
<Setter Property="TextElement.FontSize" Value="13" />
|
|
|
|
<Setter Property="TextElement.FontWeight" Value="Regular" />
|
|
|
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource SecondaryTextBrush}" />
|
|
|
|
<Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
|
|
|
|
<Setter Property="TextOptions.TextRenderingMode" Value="Auto" />
|
|
|
|
<Setter Property="UseLayoutRounding" Value="True" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource MaterialDesignScrollBarMinimal}" TargetType="{x:Type ScrollBar}" />
|
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource MaterialDesignLinearProgressBar}" TargetType="{x:Type ProgressBar}">
|
|
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource SecondaryAccentBrush}" />
|
|
|
|
<Setter Property="Height" Value="2" />
|
|
|
|
<Setter Property="Maximum" Value="1" />
|
|
|
|
<Setter Property="Minimum" Value="0" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource MaterialDesignTextBox}" TargetType="{x:Type TextBox}">
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource MaterialDesignComboBox}" TargetType="{x:Type ComboBox}">
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style BasedOn="{StaticResource MaterialDesignDatePicker}" TargetType="{x:Type DatePicker}">
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style
|
|
|
|
x:Key="MaterialDesignFlatDarkButton"
|
|
|
|
BasedOn="{StaticResource MaterialDesignFlatButton}"
|
|
|
|
TargetType="{x:Type Button}">
|
|
|
|
<Style.Resources>
|
|
|
|
<SolidColorBrush x:Key="MaterialDesignFlatButtonClick" Color="#4C4C4C" />
|
|
|
|
</Style.Resources>
|
|
|
|
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidForegroundBrush}" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style
|
|
|
|
x:Key="MaterialDesignFlatActionToggleButton"
|
|
|
|
BasedOn="{StaticResource MaterialDesignActionToggleButton}"
|
|
|
|
TargetType="{x:Type ToggleButton}">
|
|
|
|
<Setter Property="Background" Value="Transparent" />
|
|
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryHueMidBrush}" />
|
|
|
|
|
|
|
|
<Style.Triggers>
|
|
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
|
|
<Setter Property="Background" Value="{DynamicResource MaterialDesignFlatButtonClick}" />
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignFlatButtonClick}" />
|
|
|
|
</Trigger>
|
|
|
|
</Style.Triggers>
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<!-- Default MD Expander is incredibly slow (https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/issues/1307) -->
|
|
|
|
<Style BasedOn="{StaticResource MaterialDesignExpander}" TargetType="{x:Type Expander}">
|
|
|
|
<Setter Property="Template">
|
|
|
|
<Setter.Value>
|
|
|
|
<ControlTemplate TargetType="Expander">
|
|
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
|
|
|
<DockPanel Background="{TemplateBinding Background}">
|
|
|
|
<ToggleButton
|
|
|
|
Name="HeaderSite"
|
|
|
|
BorderThickness="0"
|
|
|
|
Content="{TemplateBinding Header}"
|
|
|
|
ContentStringFormat="{TemplateBinding HeaderStringFormat}"
|
|
|
|
ContentTemplate="{TemplateBinding HeaderTemplate}"
|
|
|
|
ContentTemplateSelector="{TemplateBinding HeaderTemplateSelector}"
|
|
|
|
Cursor="Hand"
|
|
|
|
DockPanel.Dock="Top"
|
|
|
|
Focusable="False"
|
|
|
|
Foreground="{TemplateBinding Foreground}"
|
|
|
|
IsChecked="{Binding Path=IsExpanded, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
|
|
|
|
IsTabStop="False"
|
|
|
|
Opacity=".87"
|
|
|
|
Style="{StaticResource MaterialDesignExpanderDownHeaderStyle}"
|
|
|
|
TextElement.FontSize="15" />
|
|
|
|
<Border
|
|
|
|
Name="ContentSite"
|
|
|
|
DockPanel.Dock="Bottom"
|
|
|
|
Visibility="Collapsed">
|
|
|
|
<StackPanel
|
|
|
|
Name="ContentPanel"
|
|
|
|
Margin="{TemplateBinding Padding}"
|
|
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
|
|
|
<ContentPresenter
|
|
|
|
Name="PART_Content"
|
|
|
|
ContentStringFormat="{TemplateBinding ContentStringFormat}"
|
|
|
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
|
|
|
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"
|
|
|
|
Focusable="False" />
|
|
|
|
</StackPanel>
|
|
|
|
</Border>
|
|
|
|
</DockPanel>
|
|
|
|
</Border>
|
|
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsExpanded" Value="true">
|
|
|
|
<Setter TargetName="ContentSite" Property="Visibility" Value="Visible" />
|
|
|
|
</Trigger>
|
|
|
|
<Trigger Property="ExpandDirection" Value="Right">
|
|
|
|
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Left" />
|
|
|
|
<Setter TargetName="ContentSite" Property="DockPanel.Dock" Value="Right" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Orientation" Value="Horizontal" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Height" Value="Auto" />
|
|
|
|
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource MaterialDesignExpanderRightHeaderStyle}" />
|
|
|
|
</Trigger>
|
|
|
|
|
|
|
|
<Trigger Property="ExpandDirection" Value="Left">
|
|
|
|
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Right" />
|
|
|
|
<Setter TargetName="ContentSite" Property="DockPanel.Dock" Value="Left" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Orientation" Value="Horizontal" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Height" Value="Auto" />
|
|
|
|
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource MaterialDesignExpanderLeftHeaderStyle}" />
|
|
|
|
</Trigger>
|
|
|
|
|
|
|
|
<Trigger Property="ExpandDirection" Value="Up">
|
|
|
|
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Bottom" />
|
|
|
|
<Setter TargetName="ContentSite" Property="DockPanel.Dock" Value="Top" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Orientation" Value="Vertical" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Width" Value="Auto" />
|
|
|
|
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource MaterialDesignExpanderUpHeaderStyle}" />
|
|
|
|
</Trigger>
|
|
|
|
|
|
|
|
<Trigger Property="ExpandDirection" Value="Down">
|
|
|
|
<Setter TargetName="HeaderSite" Property="DockPanel.Dock" Value="Top" />
|
|
|
|
<Setter TargetName="ContentSite" Property="DockPanel.Dock" Value="Bottom" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Orientation" Value="Vertical" />
|
|
|
|
<Setter TargetName="ContentPanel" Property="Width" Value="Auto" />
|
|
|
|
<Setter TargetName="HeaderSite" Property="Style" Value="{StaticResource MaterialDesignExpanderDownHeaderStyle}" />
|
|
|
|
</Trigger>
|
|
|
|
</ControlTemplate.Triggers>
|
|
|
|
</ControlTemplate>
|
|
|
|
</Setter.Value>
|
|
|
|
</Setter>
|
|
|
|
</Style>
|
|
|
|
</s:ApplicationLoader>
|
|
|
|
</Application.Resources>
|
|
|
|
</Application>
|