<Page
    x:Class="ImagingSamples.FaceWarp"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:ImagingSamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">
    
    <Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto" />
			<RowDefinition Height="*" />
		</Grid.RowDefinitions>
		<StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Margin="0 0 0 10">
            <Button x:Name="button1" x:Uid="/ImagingSamplesLib/Resources/LoadImage" Click="LoadImage" Margin="0 0 10 0" Width="180" HorizontalAlignment="Right" />
            <Button x:Name="button2" x:Uid="/ImagingSamplesLib/Resources/ExportSelection" Click="ExportImage" Margin="0 0 10 0" Grid.Column="1" Width="180" />
            <Button x:Name="button3" x:Uid="/ImagingSamplesLib/Resources/Restart" Click="Restart" Grid.Column="2" Width="140" HorizontalAlignment="Left" />
		</StackPanel>
		<Grid Name="imageGrid" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center">
			<Image Stretch="None" Name="image" />
		</Grid>
        <VisualStateManager.VisualStateGroups>

            <!-- Visual states reflect the application's window size -->
            <VisualStateGroup>
                <VisualState x:Name="WideLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="540" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                    </VisualState.Setters>
                </VisualState>

                <VisualState x:Name="NarrowLayout">
                    <VisualState.StateTriggers>
                        <AdaptiveTrigger MinWindowWidth="0" />
                    </VisualState.StateTriggers>
                    <VisualState.Setters>
                        <Setter Target="button1.Width" Value="100" />
                        <Setter Target="button1.Margin" Value="2 0 5 0" />
                        <Setter Target="button2.Width" Value="110" />
                        <Setter Target="button2.Margin" Value="0 0 5 0" />
                        <Setter Target="button3.Width" Value="90" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateManager.VisualStateGroups>
    </Grid>
</Page>
