<Page x:Class="PhotoGallery.PhotoPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Photo Page">
    <Page.Resources>
        <LinearGradientBrush x:Key="shinyBrush" StartPoint="0,0" EndPoint="0,1">
            <GradientStop Offset="0" Color="White"/>
            <GradientStop Offset="0.5" Color="#EEF5FC"/>
            <GradientStop Offset="0.5" Color="#E7EEF8"/>
            <GradientStop Offset="0.5" Color="#CDDAEA"/>
            <GradientStop Offset="0.9" Color="#E7EEF8"/>
            <GradientStop Offset="0.9" Color="#CDDAEA"/>
            <GradientStop Offset="1" Color="#A0AFC3"/>
        </LinearGradientBrush>
        <LinearGradientBrush x:Key="footerBrush" StartPoint="0,0" EndPoint="0,1">
            <GradientStop Offset="0" Color="#C0CDDE"/>
            <GradientStop Offset="0.15" Color="#E8F0F8"/>
            <GradientStop Offset="0.15" Color="#EBF2FA"/>
            <GradientStop Offset="1" Color="#E5EEF8"/>
        </LinearGradientBrush>
    </Page.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="35"/>
            <RowDefinition/>
            <RowDefinition Height="35"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="200"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Rectangle Grid.ColumnSpan="3" Fill="{StaticResource shinyBrush}"/>
        <Rectangle Grid.Row="2" Grid.ColumnSpan="3" Fill="{StaticResource footerBrush}"/>

        <Menu Background="Transparent" Name="menu1" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="3" Foreground="White">
            <MenuItem Header="_File" Foreground="#1E395B" Padding="20 8 20 8">
                <MenuItem x:Name="renameMenu" Header="Rena_me" Click="renameMenu_Click" Foreground="Black" />
                <Separator/>
                <MenuItem Header="E_xit" Click="exitMenu_Click" Foreground="Black" />
            </MenuItem>
            <MenuItem x:Name="fixMenu" Foreground="#1E395B" Padding="20 8 20 8" Click="fixMenu_Click" Header="Fi_x"/>
            <MenuItem x:Name="printMenu" Foreground="#1E395B" Padding="20 8 20 8" Click="printMenu_Click" Header="_Print"/>
            <MenuItem x:Name="editMenu" Foreground="#1E395B" Padding="20 8 20 8" Header="_Edit" Click="editMenu_Click" />
        </Menu>

        <DockPanel x:Name="imageView" SnapsToDevicePixels="True" Grid.Row="1" Grid.ColumnSpan="3">
            <StackPanel x:Name="fixBar" DockPanel.Dock="Right">
                <Button Click="fix_RotateClockwise_Click" Margin="20">Rotate Clockwise</Button>
                <Button Click="fix_RotateCounterclockwise_Click" Margin="20">Rotate Counterclockwise</Button>
                <Button Click="fix_Save_Click" Margin="20">Save</Button>
            </StackPanel>
            <Grid>
                <Image VerticalAlignment="Center" x:Name="image">
                    <Image.LayoutTransform>
                        <RotateTransform/>
                    </Image.LayoutTransform>
                </Image>
            </Grid>
        </DockPanel>

        <Grid Grid.Row="2" Grid.ColumnSpan="3" HorizontalAlignment="Right" Margin="0 0 10 0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition Width="Auto"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Center">
                <Button x:Name="previousButton" Click="previousButton_Click" VerticalAlignment="Center" IsEnabled="False" Opacity=".5" ToolTip="Previous (Left Arrow)" Margin="1 0 1 0" Background="Transparent" BorderBrush="Transparent">
                    <Image RenderOptions.BitmapScalingMode="NearestNeighbor" Height="22" Source="images\previous.gif"/>
                </Button>
                <Button x:Name="slideshowButton" Click="slideshowButton_Click" VerticalAlignment="Center" ToolTip="Play Slide Show" Margin="1 0 1 0" Background="Transparent" BorderBrush="Transparent">
                    <Image RenderOptions.BitmapScalingMode="NearestNeighbor" Height="22" Source="images\slideshow.gif"/>
                </Button>
                <Button x:Name="nextButton" Click="nextButton_Click" VerticalAlignment="Center" IsEnabled="False" Opacity=".5" ToolTip="Next (Right Arrow)" Margin="1 0 1 0" Background="Transparent" BorderBrush="Transparent">
                    <Image RenderOptions.BitmapScalingMode="NearestNeighbor" Height="22" Source="images\next.gif"/>
                </Button>
            </StackPanel>
        </Grid>
    </Grid>
</Page>
