<Page
    x:Class="FlexReportSamples.ViewerPage"
    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:c1="using:C1.Xaml"
    xmlns:fv="using:C1.Xaml.FlexViewer"
    mc:Ignorable="d">

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

    <fv:C1FlexViewerPane x:Name="flexViewerPane" Padding="2" />

    <CommandBar Grid.Row="1">

      <AppBarButton Icon="Zoom"
                    Label="{Binding lblZoom_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                    DataContext="{Binding ElementName=flexViewerPane}">
        <AppBarButton.Flyout>
          <MenuFlyout>
            <MenuFlyoutItem Text="{Binding lblActualSize_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.ActualSizeCommand"
                            c1:CommandExtensions.CommandTarget="{Binding}" />
            <MenuFlyoutItem Text="{Binding lblPageWidth_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.PageWidthCommand"
                            c1:CommandExtensions.CommandTarget="{Binding}" />
            <MenuFlyoutItem Text="{Binding lblWholePage_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.WholePageCommand"
                            c1:CommandExtensions.CommandTarget="{Binding}" />
            <MenuFlyoutSeparator />
            <MenuFlyoutItem Text="{Binding lblOnePage_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.OnePageViewCommand"
                            c1:CommandExtensions.CommandTarget="{Binding}" />
            <MenuFlyoutItem Text="{Binding lblFacingPages_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.FacingPagesCommand"
                            c1:CommandExtensions.CommandTarget="{Binding}" />
            <MenuFlyoutItem Text="{Binding lblTwoPages_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.TwoPagesViewCommand"
                            c1:CommandExtensions.CommandTarget="{Binding}" />
            <MenuFlyoutItem Text="{Binding lblFourPages_Text, Source={StaticResource FlexReportSamplesLocalization}}"
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.FourPagesViewCommand"
                            c1:CommandExtensions.CommandTarget="{Binding}" />
            <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}}" 
                            c1:CommandExtensions.Command="fv:C1FlexViewerPane.PrintCommand"
                            c1:CommandExtensions.CommandTarget="{Binding 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>
