<Window x:Class="Editor.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:Editor">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2">
            <Button Content="Новый" Height="32" ToolTip="Ctrl+N" Click="New_Click" />
            <Button Content="Открыть" Height="32" ToolTip="Ctrl+O" Click="Open_Click" />
            <Button Content="Сохранить" Height="32" ToolTip="Ctrl+S" Click="Save_Click" />
            <Button Content="Сохранить как" Height="32" ToolTip="Ctrl+Alt+S" Click="SaveAs_Click" />
            <Button Content="Пуск" Height="32" ToolTip="F5" Click="Run_Click" />
        </StackPanel>
        <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.ColumnSpan="2">
            <TextBlock Text="Размер " />
            <TextBox x:Name="XSizeBox" Text="10" MinWidth="32" GotFocus="TextBox_GotFocus" />
            <TextBlock Text="x" />
            <TextBox x:Name="YSizeBox" Text="10" MinWidth="32" GotFocus="TextBox_GotFocus" />
            <Button x:Name="ApplySize" Content="Применить" Click="ApplySize_Click" />
        </StackPanel>
        <local:MapCanvas x:Name="Canvas" Grid.Row="2" PointerOver="Canvas_PointerOver" />
        <Border Grid.Column="1" Grid.Row="2" Grid.RowSpan="2">
            <Border.Background>
                <SolidColorBrush Color="{DynamicResource {x:Static SystemColors.WindowFrameColorKey}}"/>
            </Border.Background>
            <local:ToolSelector Selected="ToolSelector_Selected" Margin="8" />
        </Border>
        <TextBlock x:Name="CurrentPointBlock" Grid.Row="3" />
    </Grid>
</Window>