Files
laatzen/Common/OMNIPruefung/App.xaml
T
2023-12-14 16:18:51 +01:00

152 lines
8.0 KiB
XML

<Application x:Class="OMNIPruefung.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Helpers="clr-namespace:OMNIPruefung.Helpers"
xmlns:ContentV="clr-namespace:OMNIPruefung.Views.Content"
xmlns:OptionsV="clr-namespace:OMNIPruefung.Views.Options"
xmlns:ContentVM="clr-namespace:OMNIPruefung.ViewModels.Content"
xmlns:OptionsVM="clr-namespace:OMNIPruefung.ViewModels.Options"
StartupUri="MainWindow.xaml">
<Application.Resources>
<Style TargetType="Label">
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="Padding" Value="0" />
</Style>
<Style TargetType="TextBox">
<Setter Property="Padding" Value="3, 5" />
<Setter Property="FontFamily" Value="Consolas" />
</Style>
<Style TargetType="Button">
<Setter Property="FontFamily" Value="Consolas" />
</Style>
<SolidColorBrush x:Key="LightBlue" Color="#ECF0F1" />
<SolidColorBrush x:Key="DarkBlue" Color="#003595" />
<SolidColorBrush x:Key="Blue" Color="#0072CE" />
<SolidColorBrush x:Key="HoverBlue" Color="#110072CE" />
<SolidColorBrush x:Key="Green" Color="#71D54C" />
<SolidColorBrush x:Key="HoverGreen" Color="#1171D54C" />
<SolidColorBrush x:Key="Red" Color="#CF2E2E" />
<SolidColorBrush x:Key="HoverRed" Color="#11F78DA7" />
<Style x:Key="SystemBtn" TargetType="{x:Type Button}">
<Setter Property="Background" Value="{x:Static SystemColors.ControlBrush}" />
<Setter Property="BorderBrush" Value="{x:Static SystemColors.ControlBrush}" />
<Setter Property="Foreground" Value="{x:Static SystemColors.ControlTextBrush}" />
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="FontFamily" Value="Consolas" />
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Margin" Value="13, 0, 0, 0" />
<Setter Property="Padding" Value="13, 8"/>
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Border x:Name="border"
CornerRadius="3.5"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="true">
<ContentPresenter x:Name="contentPresenter"
Focusable="False"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
Margin="{TemplateBinding Padding}"
RecognizesAccessKey="True"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter Property="Background" TargetName="border" Value="{x:Static SystemColors.ControlLightBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static SystemColors.ControlDarkBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter Property="Background" TargetName="border" Value="{x:Static SystemColors.ControlLightBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static SystemColors.ControlDarkBrush}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Background" TargetName="border" Value="{x:Static SystemColors.ControlLightBrush}"/>
<Setter Property="BorderBrush" TargetName="border" Value="{x:Static SystemColors.ControlDarkBrush}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Helpers:BooleanVisibilityConverter x:Key="BooleanVisibility" />
<Helpers:BooleanProgressBackgroundConverter x:Key="BooleanProgress" />
<Style x:Key="RadioNodeStyle" TargetType="{x:Type RadioButton}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
<Border Background="{TemplateBinding Background}"
Padding="{TemplateBinding Padding}">
<ContentPresenter SnapsToDevicePixels="True" />
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="#55f0f0f0" />
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="AliceBlue" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsMouseOver" Value="True" />
<Condition Property="IsChecked" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" Value="AliceBlue" />
</MultiTrigger>
</Style.Triggers>
</Style>
<DataTemplate DataType="{x:Type OptionsVM:MainOptionVM}">
<OptionsV:Option DataContext="{Binding .}" Icon="/Images/folder.png"/>
</DataTemplate>
<DataTemplate DataType="{x:Type OptionsVM:ExchangeHubOptionVM}">
<OptionsV:Option DataContext="{Binding .}" Icon="/Images/folder.png"/>
</DataTemplate>
<DataTemplate DataType="{x:Type OptionsVM:EOLOptionVM}">
<OptionsV:Option DataContext="{Binding .}" Icon="/Images/folder.png"/>
</DataTemplate>
<DataTemplate DataType="{x:Type OptionsVM:COMOptionVM}">
<OptionsV:COMOption DataContext="{Binding .}" ProgressIcon="/Images/meter.png"/>
</DataTemplate>
<DataTemplate DataType="{x:Type ContentVM:MainContentVM}">
<Label Content="{Binding Header}" />
</DataTemplate>
<DataTemplate DataType="{x:Type ContentVM:ExchangeHubContentVM}">
<ContentV:ExchangeHub DataContext="{Binding .}" />
</DataTemplate>
<DataTemplate DataType="{x:Type ContentVM:EOLContentVM}">
<ContentV:EOLContent DataContext="{Binding .}" />
</DataTemplate>
<DataTemplate DataType="{x:Type ContentVM:COMContentVM}">
<ContentV:COMContent DataContext="{Binding .}" />
</DataTemplate>
<!--<a href="https://www.flaticon.com/free-icons/folder" title="folder icons">Folder icons created by kmg design - Flaticon</a>-->
<!--<a href="https://www.flaticon.com/free-icons/water-meter" title="water meter icons">Water meter icons created by Umeicon - Flaticon</a>-->
<!--<a href="https://www.flaticon.com/free-icons/settings" title="settings icons">Settings icons created by Freepik - Flaticon</a>-->
</Application.Resources>
</Application>