<?xml version="1.0" encoding="utf-8" ?>
<UserControl
    x:Class="Microsoft.CmdPal.UI.Controls.ImageViewer"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Microsoft.CmdPal.UI.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:help="using:Microsoft.CmdPal.UI.Helpers"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <Grid
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch"
        Background="Transparent">
        <controls:IconBox
            x:Name="ZoomImage"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            IsTabStop="False"
            RenderTransformOrigin="0.5,0.5"
            SourceRequested="{x:Bind help:IconProvider.SourceRequestedOriginal}">
            <controls:IconBox.RenderTransform>
                <TransformGroup>
                    <ScaleTransform x:Name="ScaleTransform" ScaleX="1" ScaleY="1" />
                    <TranslateTransform x:Name="TranslateTransform" X="0" Y="0" />
                </TransformGroup>
            </controls:IconBox.RenderTransform>
        </controls:IconBox>

        <Border
            x:Name="ToolbarHost"
            Margin="0,0,0,12"
            Padding="8"
            HorizontalAlignment="Center"
            VerticalAlignment="Bottom"
            Background="{ThemeResource SystemControlAcrylicWindowBrush}"
            BorderBrush="{ThemeResource ControlStrokeColorDefaultBrush}"
            BorderThickness="1"
            CornerRadius="8">
            <StackPanel
                x:Name="Toolbar"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Background="Transparent"
                Orientation="Horizontal"
                Spacing="8">
                <Button
                    x:Uid="ImageViewer_ZoomInButton"
                    Padding="8,6"
                    Click="OnZoomInClick">
                    <SymbolIcon Symbol="ZoomIn" />
                </Button>
                <Button
                    x:Uid="ImageViewer_ZoomOutButton"
                    Padding="8,6"
                    Click="OnZoomOutClick">
                    <SymbolIcon Symbol="ZoomOut" />
                </Button>
                <Button
                    x:Uid="ImageViewer_ZoomToFitButton"
                    Padding="8,6"
                    Click="OnZoomToFitClick">
                    <FontIcon Glyph="&#xE9A6;" />
                </Button>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
