<?xml version="1.0" encoding="utf-8" ?>
<Page
    x:Class="AIDevGallery.Sample.Sample"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid>
        <Grid
            MinWidth="240"
            MaxWidth="600"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
            BorderBrush="{ThemeResource SurfaceStrokeColorDefaultBrush}"
            BorderThickness="2"
            CornerRadius="{StaticResource OverlayCornerRadius}">
            <Viewbox
                x:Name="ImageViewbox"
                Margin="-1"
                VerticalAlignment="Stretch"
                Stretch="Uniform">
                <Image x:Name="ImageSrc" />
            </Viewbox>

            <Grid
                Margin="8"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Background="{ThemeResource AcrylicBackgroundFillColorDefaultBrush}"
                CornerRadius="{StaticResource ControlCornerRadius}">
                <DropDownButton
                    Padding="8"
                    AutomationProperties.Name="Select image"
                    ToolTipService.ToolTip="Select image">
                    <DropDownButton.Flyout>
                        <MenuFlyout Placement="Bottom">
                            <MenuFlyoutItem Click="LoadImage_Click" Text="From file" />
                            <MenuFlyoutItem Click="PasteImage_Click" Text="From clipboard" />
                        </MenuFlyout>
                    </DropDownButton.Flyout>
                    <FontIcon FontSize="16" Glyph="&#xEE71;" />
                </DropDownButton>
            </Grid>

            <StackPanel
                Margin="8"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Background="{ThemeResource AcrylicBackgroundFillColorDefaultBrush}"
                CornerRadius="{StaticResource ControlCornerRadius}"
                Orientation="Horizontal"
                Spacing="8">
                <DropDownButton
                    x:Name="ScenarioSelectButton"
                    Padding="8"
                    AutomationProperties.Name="Select scenario"
                    ToolTipService.ToolTip="Select scenario"
                    Visibility="Collapsed">
                    <DropDownButton.Flyout>
                        <MenuFlyout Placement="Bottom">
                            <MenuFlyoutItem
                                Click="MenuFlyoutItem_Click"
                                Tag="Accessible"
                                Text="Accessible" />
                            <MenuFlyoutItem
                                Click="MenuFlyoutItem_Click"
                                Tag="Caption"
                                Text="Caption" />
                            <MenuFlyoutItem
                                Click="MenuFlyoutItem_Click"
                                Tag="Detailed"
                                Text="Detailed" />
                            <MenuFlyoutItem
                                Click="MenuFlyoutItem_Click"
                                Tag="OfficeCharts"
                                Text="Office charts" />
                        </MenuFlyout>
                    </DropDownButton.Flyout>
                    <TextBlock x:Name="ScenarioSelectTextblock" Text="Caption" />
                </DropDownButton>
                <Button
                    x:Name="StopBtn"
                    MinWidth="86"
                    AutomationProperties.Name="Stop"
                    Click="StopBtn_Click">
                    <StackPanel Orientation="Horizontal" Spacing="8">
                        <FontIcon
                            x:Name="StopIcon"
                            FontSize="16"
                            Glyph="&#xE73B;" />
                        <TextBlock Text="Stop" />
                    </StackPanel>
                </Button>
            </StackPanel>

            <Grid
                MinHeight="35"
                Margin="8"
                Padding="8"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Bottom"
                Background="{ThemeResource AcrylicBackgroundFillColorDefaultBrush}"
                CornerRadius="{StaticResource ControlCornerRadius}">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>
                <ProgressRing
                    x:Name="Loader"
                    Width="32"
                    Height="32"
                    Margin="0,0,8,0"
                    VerticalAlignment="Top"
                    IsActive="True"
                    Visibility="Visible" />
                <TextBlock
                    x:Name="ResponseTxt"
                    Grid.Column="1"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                    IsTextSelectionEnabled="True"
                    TextWrapping="Wrap"
                    Visibility="Collapsed" />
            </Grid>
        </Grid>
    </Grid>
</Page>
