Moving style resources to default.xaml

This commit is contained in:
Brett Hewitson 2021-12-01 11:14:58 +10:00
parent 48a915e239
commit 57d13faa8f
25 changed files with 806 additions and 989 deletions

View file

@ -1,14 +1,14 @@
<Window x:Class="ServerManagerTool.RconWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sm="clr-namespace:ServerManagerTool"
xmlns:en="clr-namespace:ServerManagerTool.Enums"
xmlns:vm="clr-namespace:ServerManagerTool.Lib.ViewModel"
xmlns:cc="clr-namespace:ServerManagerTool.Common.Converters;assembly=ServerManager.Common"
xmlns:clib="clr-namespace:ServerManagerTool.Common.Lib;assembly=ServerManager.Common"
xmlns:com="clr-namespace:ServerManagerTool.Common;assembly=ServerManager.Common"
xmlns:en="clr-namespace:ServerManagerTool.Enums"
xmlns:vm="clr-namespace:ServerManagerTool.Lib.ViewModel"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
Width="1024" Height="768" MinWidth="640" MinHeight="480" ResizeMode="CanResizeWithGrip"
SizeChanged="RCON_SizeChanged" LocationChanged="RCON_LocationChanged"
Name="RCON" Icon="../Art/favicon.ico" Title="{Binding RconParameters.WindowTitle}">
@ -20,54 +20,8 @@
</ResourceDictionary.MergedDictionaries>
<sm:ScrollToBottomAction x:Key="ScrollToBottomAction" />
<cc:EnumConverter x:Key="EnumConverter"/>
<cc:EnumFlagsConverter x:Key="EnumFlagsConverter"/>
<cc:IsNullOrWhiteSpaceValueConverter x:Key="IsNullOrWhiteSpaceValueConverter"/>
<cc:IsNullValueConverter x:Key="IsNullValueConverter"/>
<cc:NullValueConverter x:Key="NullValueConverter"/>
<SolidColorBrush x:Key="HeaderBrush" Color="#FFF0F0F0"/>
<Style x:Key="PlayerStatus" TargetType="Border">
<Setter Property="BorderBrush" Value="Gray"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsOnline}" Value="True">
<Setter Property="BorderBrush" Value="LightGreen"/>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsOnline}" Value="False" />
<Condition Binding="{Binding IsValid}" Value="False" />
</MultiDataTrigger.Conditions>
<Setter Property="BorderBrush" Value="Orange"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsOnline}" Value="False" />
<Condition Binding="{Binding IsWhitelisted}" Value="True" />
</MultiDataTrigger.Conditions>
<Setter Property="BorderBrush" Value="#0066CC"/>
</MultiDataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="GuildName" TargetType="Label">
<Style.Triggers>
<DataTrigger Binding="{Binding GuildName, Converter={StaticResource IsNullOrWhiteSpaceValueConverter}}" Value="True">
<Setter Property="Content" Value="No clan"/>
<Setter Property="FontStyle" Value="Italic"/>
<Setter Property="Foreground" Value="LightGray"/>
</DataTrigger>
<DataTrigger Binding="{Binding GuildName, Converter={StaticResource IsNullOrWhiteSpaceValueConverter}}" Value="False">
<Setter Property="Content" Value="{Binding PlayerData.Guild.GuildName}"/>
<Setter Property="FontStyle" Value="Normal"/>
<Setter Property="Foreground" Value="Black"/>
</DataTrigger>
</Style.Triggers>
</Style>
<ObjectDataProvider MethodName="GetValues"
ObjectType="{x:Type sys:Enum}"
x:Key="InputModes">
<ObjectDataProvider MethodName="GetValues" ObjectType="{x:Type sys:Enum}" x:Key="InputModes">
<ObjectDataProvider.MethodParameters>
<x:Type TypeName="sm:InputMode" />
</ObjectDataProvider.MethodParameters>