<Window
    x:Class="ColorPicker.ColorEditorWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:behaviors="clr-namespace:ColorPicker.Behaviors"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:e="http://schemas.microsoft.com/xaml/behaviors"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:p="clr-namespace:ColorPicker.Properties"
    Width="440"
    Height="380"
    AutomationProperties.Name="{x:Static p:Resources.cp_editor}"
    ResizeMode="NoResize"
    Topmost="True"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <e:Interaction.Behaviors>
        <behaviors:CloseZoomWindowBehavior />
    </e:Interaction.Behaviors>
    <Border x:Name="MainBorder" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <DockPanel
                Grid.Row="0"
                Background="Transparent"
                MouseLeftButtonDown="TitleBar_MouseDown"
                MouseRightButtonUp="TitleBar_MouseRightClick">
                <Image
                    Width="20"
                    Height="20"
                    Margin="10,5,5,8"
                    Source="pack://application:,,,/Assets/ColorPicker/icon.ico" />
                <TextBlock
                    Margin="10"
                    VerticalAlignment="Center"
                    Text="{x:Static p:Resources.CP_Title}" />
                <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
                    <Button
                        Width="50"
                        Height="30"
                        Margin="10,-10,-2,1"
                        Click="Close_Click"
                        Content="&#xE711;"
                        FontFamily="{StaticResource IconFontFamily}"
                        Style="{StaticResource TitleBarCloseButtonStyle}" />
                </StackPanel>
            </DockPanel>
            <ContentPresenter
                x:Name="contentPresenter"
                Grid.Row="1"
                Content="{Binding Content}" />
        </Grid>
    </Border>
</Window>
