<Window x:Class="OPlanner.PrintAreaProperties" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Set Print Area" WindowStartupLocation="CenterOwner" WindowState="Maximized" xmlns:CustomControl="clr-namespace:OPlanner">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition></RowDefinition>
            <RowDefinition Height="30"></RowDefinition>
        </Grid.RowDefinitions>
        <ScrollViewer Grid.Row="0" Background="#CCCCCC" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Name="mainScroll">
            <Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Name="mainContent" ClipToBounds="False">
                <CustomControl:OCanvas x:Name="mainCanvas"></CustomControl:OCanvas>
                <Grid Name="printAreaVisual">
                    <Border BorderBrush="Black" BorderThickness="1" Background="#33FF0000">
                        <Canvas HorizontalAlignment="Center" VerticalAlignment="Center" Width="20" Height="20">
                            <Path Stroke="Black" StrokeThickness="1" Data="M 0,10 L 20,10"></Path>
                            <Path Stroke="Black" StrokeThickness="1" Data="M 10,0 L 10,20"></Path>
                        </Canvas>
                    </Border>
                </Grid>
            </Canvas>
        </ScrollViewer>
        <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,0,0,0">
            <Label VerticalAlignment="Center">Print Area Offset</Label>
            <Label VerticalAlignment="Center" Margin="5,0,0,0">X:</Label>
            <TextBox VerticalAlignment="Center" Width="40" Name="xOffsetText" PreviewLostKeyboardFocus="xOffsetText_PreviewLostKeyboardFocus"></TextBox>
            <Label VerticalAlignment="Center" Margin="5,0,0,0">Y:</Label>
            <TextBox VerticalAlignment="Center" Width="40" Name="yOffsetText" PreviewLostKeyboardFocus="yOffsetText_PreviewLostKeyboardFocus"></TextBox>
            <Button Margin="10,0,0,0" Name="resetButton" Click="resetButton_Click" VerticalAlignment="Center">Reset</Button>
            <Button Name="saveButton" Click="saveButton_Click" VerticalAlignment="Center" Margin="20,0,0,0">Save</Button>
            <Button Margin="5,0,0,0" Name="cancelButton" Click="cancelButton_Click" VerticalAlignment="Center">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>
