174 lines
10 KiB
XML
174 lines
10 KiB
XML
<Window x:Class="ProgramLib.GUI.View.DataLocationWindow"
|
|
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="Data Locations"
|
|
WindowStyle="None"
|
|
MouseLeftButtonDown="Window_MouseLeftButtonDown"
|
|
Height="155"
|
|
Width="550">
|
|
<WindowChrome.WindowChrome>
|
|
<WindowChrome GlassFrameThickness="1" CornerRadius="13,13,13,13" CaptionHeight="0"/>
|
|
</WindowChrome.WindowChrome>
|
|
<Window.Resources>
|
|
<!-- 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 for minimize and maximize buttons -->
|
|
<Style x:Key="TitleBarButtonStyle" 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="#bee6fd"/>
|
|
<Setter TargetName="bdr_main" Property="BorderBrush" Value="#7fb1cd"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter TargetName="bdr_main" Property="Background" Value="#a1bfd0"/>
|
|
<Setter TargetName="bdr_main" Property="BorderBrush" Value="#4c778f"/>
|
|
</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>
|
|
|
|
<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">Data Locations</TextBlock>
|
|
</WrapPanel>
|
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
|
|
<Button Style="{StaticResource TitleBarButtonStyle}" x:Name="btnMin" Width="44" Background="Transparent" BorderBrush="Transparent" Click="btnMin_Click">
|
|
<Image Source="pack://application:,,,/Program;component/Resources/Images/Title_Bar_Buttons/minimize.png" Width="12" Height="12"/>
|
|
</Button>
|
|
<Button Style="{StaticResource TitleBarButtonStyle}" x:Name="btnMax" Width="44" Background="Transparent" BorderBrush="Transparent" Click="btnMax_Click">
|
|
<Image x:Name="imgMax" Source="pack://application:,,,/Program;component/Resources/Images/Title_Bar_Buttons/maximize.png" Width="13" Height="13"/>
|
|
</Button>
|
|
<Button x:FieldModifier="public" Style="{StaticResource TitleBarCloseButtonStyle}" x:Name="btnClose" Width="44" Background="Transparent" BorderBrush="Transparent" Click="btnClose_Click">
|
|
<Image Source="pack://application:,,,/Program;component/Resources/Images/Title_Bar_Buttons/close_black.png" Width="20" Height="20"/>
|
|
</Button>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<DockPanel Grid.Row="1" Height="120" VerticalAlignment="Top" Margin="5,0,5,5">
|
|
<Border DockPanel.Dock="Top" BorderThickness="1" BorderBrush="#bdbcbd" Background="#f0f0f0">
|
|
<WrapPanel>
|
|
<StackPanel Margin="10">
|
|
<Label Padding="0">UUT Data Location:</Label>
|
|
<TextBox x:Name="uutDataLocationTb" Width="400" IsReadOnly="True"/>
|
|
</StackPanel>
|
|
<Button x:Name="uutDataLocationBtn" Style="{DynamicResource ButtonStyle1}" Height="20" Width="80" Padding="0" VerticalAlignment="Bottom" Margin="10,0,0,10" Click="uutDataLocationBtn_Click">Open</Button>
|
|
</WrapPanel>
|
|
</Border>
|
|
|
|
<Border DockPanel.Dock="Top" Margin="0,5,0,0" BorderThickness="1" BorderBrush="#bdbcbd" Background="#f0f0f0">
|
|
<WrapPanel>
|
|
<StackPanel Margin="10">
|
|
<Label Padding="0">Placeholder Location:</Label>
|
|
<TextBox x:Name="placeHolderTb" Width="400" IsReadOnly="True"/>
|
|
</StackPanel>
|
|
<Button x:Name="placeHolderBtn" Style="{DynamicResource ButtonStyle1}" Height="20" Width="80" Padding="0" VerticalAlignment="Bottom" Margin="10,0,0,10">Open</Button>
|
|
</WrapPanel>
|
|
</Border>
|
|
|
|
</DockPanel>
|
|
|
|
</Grid>
|
|
</Window>
|