<Page
    x:Class="FlexReportSamples.ViewerPanePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:FlexReportSamples"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:fv="using:C1.Xaml.FlexViewer"
    mc:Ignorable="d">

    <Grid Background="#FFF5A5A5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <fv:C1FlexViewerPane  Grid.Row="1" x:Name="flexViewerPane" Padding="2" />

        <CommandBar Grid.Row="0">

            <AppBarButton Icon="Zoom"
                    Label="{Binding lblZoom_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                    DataContext="{Binding ElementName=flexViewerPane}">
                <AppBarButton.Flyout>
                    <MenuFlyout Opening="MenuFlyout_Opening">
                        <MenuFlyoutItem
                            x:Name="mfiActualSize"
                            Text="{Binding lblActualSize_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            />
                        <MenuFlyoutItem
                            x:Name="mfiPageWidth"
                            Text="{Binding lblPageWidth_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            />
                        <MenuFlyoutItem
                            x:Name="mfiWholePage"
                            Text="{Binding lblWholePage_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            />
                        <MenuFlyoutSeparator />
                        <MenuFlyoutItem
                            x:Name="mfiOnePage"
                            Text="{Binding lblOnePage_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            />
                        <MenuFlyoutItem
                            x:Name="mfiFacingPages"
                            Text="{Binding lblFacingPages_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            />
                        <MenuFlyoutItem
                            x:Name="mfiTwoPages"
                            Text="{Binding lblTwoPages_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            />
                        <MenuFlyoutItem
                            x:Name="mfiFourPages"
                            Text="{Binding lblFourPages_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            />
                        <MenuFlyoutSeparator />
                        <ToggleMenuFlyoutItem
                            Text="{Binding lblPrintLayout_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            IsChecked="{Binding Paginated, Mode=TwoWay}"
                            />
                    </MenuFlyout>
                </AppBarButton.Flyout>
            </AppBarButton>

            <AppBarButton 
                Label="{Binding lblPrint_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                Command="{Binding PrintCommand, ElementName=flexViewerPane}"
                >
                <AppBarButton.Icon>
                    <FontIcon Glyph="&#x2399;" FontSize="24" FontFamily="Segoe UI Symbol" />
                </AppBarButton.Icon>
            </AppBarButton>

            <CommandBar.Content>
                <ComboBox x:Name="cbReport" Margin="0, 8, 8, 8" />
            </CommandBar.Content>

        </CommandBar>

    </Grid>
</Page>
