12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <UserControl x:Class="SonopostSearchTool.WindowHeader"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:SonopostSearchTool"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <Style x:Key="BaseButton" TargetType="{x:Type Button}">
- <Setter Property="Height" Value="20"/>
- <Setter Property="Width" Value="20"/>
- <Setter Property="BorderBrush" Value="White"/>
- <Setter Property="BorderThickness" Value="0"/>
- <Setter Property="Margin" Value="5"/>
- <Setter Property="VerticalAlignment" Value="Center"/>
- </Style>
-
- <Style x:Key="MinButton" BasedOn="{StaticResource BaseButton}" TargetType="{x:Type Button}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid Background="#01FFFFFF">
- <Path IsHitTestVisible="True" Fill="{TemplateBinding BorderBrush}" Data="M863.7 552.5H160.3c-10.6 0-19.2-8.6-19.2-19.2v-41.7c0-10.6 8.6-19.2 19.2-19.2h703.3c10.6 0 19.2 8.6 19.2 19.2v41.7c0 10.6-8.5 19.2-19.1 19.2z" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Uniform"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="BorderBrush" Value="#2561a9"/>
- <Setter Property="Background" Value="#ccdfeb"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="MaxButton" BasedOn="{StaticResource BaseButton}" TargetType="{x:Type Button}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid Background="#01FFFFFF">
- <Path IsHitTestVisible="True" Fill="{TemplateBinding BorderBrush}" Data="M770.9 923.3H253.1c-83.8 0-151.9-68.2-151.9-151.9V253.6c0-83.8 68.2-151.9 151.9-151.9h517.8c83.8 0 151.9 68.2 151.9 151.9v517.8c0 83.8-68.1 151.9-151.9 151.9zM253.1 181.7c-39.7 0-71.9 32.3-71.9 71.9v517.8c0 39.7 32.3 71.9 71.9 71.9h517.8c39.7 0 71.9-32.3 71.9-71.9V253.6c0-39.7-32.3-71.9-71.9-71.9H253.1z" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Uniform"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="BorderBrush" Value="#2561a9"/>
- <Setter Property="Background" Value="#ccdfeb"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="CloseButton" BasedOn="{StaticResource BaseButton}" TargetType="{x:Type Button}">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid Background="#01FFFFFF">
- <Path IsHitTestVisible="True" Fill="{TemplateBinding BorderBrush}" Data="M551.424 512l195.072-195.072c9.728-9.728 9.728-25.6 0-36.864l-1.536-1.536c-9.728-9.728-25.6-9.728-35.328 0L514.56 475.136 319.488 280.064c-9.728-9.728-25.6-9.728-35.328 0l-1.536 1.536c-9.728 9.728-9.728 25.6 0 36.864L477.696 512 282.624 707.072c-9.728 9.728-9.728 25.6 0 36.864l1.536 1.536c9.728 9.728 25.6 9.728 35.328 0L514.56 548.864l195.072 195.072c9.728 9.728 25.6 9.728 35.328 0l1.536-1.536c9.728-9.728 9.728-25.6 0-36.864L551.424 512z" Width="{TemplateBinding Width}" Height="{TemplateBinding Height}" VerticalAlignment="Center" HorizontalAlignment="Center" Stretch="Uniform"/>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="BorderBrush" Value="#2561a9"/>
- <Setter Property="Background" Value="#ccdfeb"/>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Background="{StaticResource MainTheme}">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <Image x:Name="WindowLogo" Source="pack://application:,,,/Resources/Images/SonoPost_Icon.ico" Width="35" Margin="10,0"/>
- <TextBlock Foreground="White" Grid.Column="1" FontSize="14" HorizontalAlignment="Left" VerticalAlignment="Center" Text="{DynamicResource Title}"/>
- <StackPanel Orientation="Horizontal" Grid.Column="2" VerticalAlignment="Center" Margin="10,0">
- <Button Style="{StaticResource MinButton}" Click="OnMinimumClick"></Button>
- <Button Style="{StaticResource MaxButton}" Click="OnMaximumClick"></Button>
- <Button Style="{StaticResource CloseButton}" Click="OnCloseClick"></Button>
- </StackPanel>
- </Grid>
- </UserControl>
|