130 lines
7.2 KiB
XML
130 lines
7.2 KiB
XML
<Window x:Class="ProgramLib.GUI.View.WaitWindow"
|
|
x:ClassModifier="internal"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:ProgramLib.GUI.View"
|
|
mc:Ignorable="d"
|
|
Title="Wait"
|
|
WindowStyle="None"
|
|
SizeToContent="WidthAndHeight"
|
|
Topmost="True"
|
|
MouseLeftButtonDown="Window_MouseLeftButtonDown"
|
|
Height="115">
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome GlassFrameThickness="1" CornerRadius="13,13,13,13" CaptionHeight="0"/>
|
|
</WindowChrome.WindowChrome>
|
|
<Window.Resources>
|
|
<FontFamily x:Key="Digital_7_Mono">pack://application:,,,/Program;component/Resources/Fonts/#Digital-7 Mono</FontFamily>
|
|
|
|
<!-- Style for the close button -->
|
|
<Style x:Key="TitleBarCloseButtonStyle" TargetType="{x:Type Button}">
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Border x:Name="bdr_main" BorderThickness="1" BorderBrush="Transparent" Background="Transparent">
|
|
<ContentPresenter x:Name="bdr_main2" VerticalAlignment="Center" HorizontalAlignment="Center" ContentSource="Content"/>
|
|
</Border>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="bdr_main" Property="Background" Value="#e94856"/>
|
|
<Setter TargetName="bdr_main" Property="BorderBrush" Value="#ba1245"/>
|
|
<Setter TargetName="bdr_main2" Property="Content">
|
|
<Setter.Value>
|
|
<Image Source="pack://application:,,,/Program;component/Resources/Images/Title_Bar_Buttons/close_white.png" Width="20" Height="20" />
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="bdr_main" Property="Background" Value="#ff829a"/>
|
|
<Setter TargetName="bdr_main" Property="BorderBrush" Value="#e94856"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Style x:Key="FocusVisual1">
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
|
|
<SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
|
|
<SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
|
|
<SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
|
|
<SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
|
|
<SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
|
|
<SolidColorBrush x:Key="Button.Disabled.Background" Color="#E5E5E5"/>
|
|
<SolidColorBrush x:Key="Button.Disabled.Border" Color="#DFDFDF"/>
|
|
<SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#A6A6A6"/>
|
|
<Style x:Key="ButtonStyle1" xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" TargetType="{x:Type Button}">
|
|
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual1}"/>
|
|
<Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
|
|
<Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Setter Property="Padding" Value="1"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Microsoft_Windows_Themes:ButtonChrome SnapsToDevicePixels="true"
|
|
x:Name="Chrome" Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}" RenderDefaulted="{TemplateBinding IsDefaulted}"
|
|
RenderMouseOver="{TemplateBinding IsMouseOver}" RenderPressed="{TemplateBinding IsPressed}">
|
|
<ContentPresenter Name="contentPresenter" Margin="{TemplateBinding Padding}"
|
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
|
RecognizesAccessKey="True"
|
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
|
</Microsoft_Windows_Themes:ButtonChrome>
|
|
<ControlTemplate.Triggers>
|
|
|
|
<Trigger Property="IsEnabled" Value="false">
|
|
<Setter Property="Background" TargetName="Chrome" Value="{StaticResource Button.Disabled.Background}"/>
|
|
<Setter Property="BorderBrush" TargetName="Chrome" Value="{StaticResource Button.Disabled.Border}"/>
|
|
<Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="{StaticResource Button.Disabled.Foreground}"/>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Window.Resources>
|
|
|
|
<!-- Main Grid that contains everything -->
|
|
<Grid Background="#f4f6fd">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="30px"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Title bar which has the app icon, app title, minimize button, maximize button and close button -->
|
|
<Grid>
|
|
<WrapPanel HorizontalAlignment="left" VerticalAlignment="Center">
|
|
<Image x:Name="imgAppIcon" Source="pack://application:,,,/Program;component/Resources/Images/missile.png" Width="20" Height="20" Margin="10,0,10,0"/>
|
|
<TextBlock x:Name="txtBlockAppTitle">Wait</TextBlock>
|
|
</WrapPanel>
|
|
</Grid>
|
|
|
|
<Border Grid.Row="1" Margin="5" Background="White" BorderBrush="#bdbcbd" BorderThickness="1">
|
|
<StackPanel>
|
|
<TextBlock x:Name="tbMessage" Margin="5,0,5,0" HorizontalAlignment="Center" FontSize="13">Message</TextBlock>
|
|
<Border Grid.Row="1" Margin="5" Background="White" BorderBrush="Black" BorderThickness="1">
|
|
<TextBlock x:Name="tbCountDownTimer" Margin="30,0,30,0" HorizontalAlignment="Center" FontSize="40" FontFamily="{StaticResource Digital_7_Mono}">00:00.00</TextBlock>
|
|
</Border>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
</Grid>
|
|
</Window>
|