<Page
    x:Class="PdfSamples.RenderUIPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:PdfSamples"
    xmlns:c1="using:C1.Xaml"
    xmlns:c1pdf="using:C1.Xaml.PdfViewer"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" Loaded="Page_Loaded">
    <Page.Resources>
        <Style TargetType="c1pdf:C1PdfViewer">
            <Setter Property="Background" Value="#eaeaea" />
            <Setter Property="BorderThickness" Value="0" />
        </Style>
    </Page.Resources>
    <Grid x:Name="layoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="48*"/>
            <ColumnDefinition Width="52*"/>
        </Grid.ColumnDefinitions>
        <ScrollViewer Grid.Row="1" Padding="0 3">
            <Grid x:Name="panel">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Border Background="#90cd97" Margin="5" Padding="10" Grid.RowSpan="2">
                    <StackPanel>
                        <Image Source="../Assets/pic.jpg" Width="300" Margin="0 0 0 10" Stretch="Uniform" />
                        <RichTextBlock Height="70" Width="300" >
                            <Paragraph>                                
                                <Bold>
                                    <Span Foreground="White" FontSize="18">
                                        <Run Text="{Binding Source={StaticResource PdfSamplesLocalization}, Path=RichTextBlock_Text}" />
                                    </Span>
                                </Bold>
                                <Span>
                                    <Run Text="{Binding Source={StaticResource PdfSamplesLocalization}, Path=RunText1_Text}" />
                                </Span>
                                <Span Foreground="White" FontSize="14">
                                    <Run Text="{Binding Source={StaticResource PdfSamplesLocalization}, Path=RunText2_Text}" />
                                </Span>
                                <Span>
                                    <Run Text="{Binding Source={StaticResource PdfSamplesLocalization}, Path=RunText3_Text}" />
                                </Span>
                            </Paragraph>
                        </RichTextBlock>
                    </StackPanel>
                </Border>
                <Border Grid.Column="1" Grid.ColumnSpan="2" Background="#eddd46" Margin="5" Padding="10">
                    <ToggleSwitch Grid.Column="1" IsOn="True" Header="{Binding Source={StaticResource PdfSamplesLocalization}, Path=ToggleSwitch_Header}" Grid.Row="1"/>
                </Border>
                <Border Grid.Column="1" Grid.Row="1" Background="#f6aac9" Margin="5" Padding="10">
                    <ListBox Width="200">
                        <ListBoxItem Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=ListBoxItem1_Content}" />
                        <ListBoxItem Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=ListBoxItem2_Content}" />
                        <ListBoxItem Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=ListBoxItem3_Content}" />
                    </ListBox>
                </Border>
                <Border Grid.ColumnSpan="3" Grid.Row="2" Background="#88bde6" Margin="5" Padding="10">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition/>
                            <ColumnDefinition/>
                        </Grid.ColumnDefinitions>
                        <StackPanel>
                            <TextBox HorizontalAlignment="Left" Text="{Binding Source={StaticResource PdfSamplesLocalization}, Path=TextBoxTB_Text}" Width="200" />
                            <CheckBox Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=CheckBoxCB_Content}" IsChecked="True" Margin="0 10"  />
                            <RadioButton Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=RadioButtonRB_Content}" IsChecked="True" />
                        </StackPanel>
                        <StackPanel Grid.Column="1">
                            <ComboBox x:Name="combo" HorizontalAlignment="Left" VerticalAlignment="Top" Width="200"/>
                            <HyperlinkButton Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=HyperlinkButton_Content}" />
                        </StackPanel>
                    </Grid>
                </Border>
                <Border Grid.Column="3" Grid.RowSpan="2" Grid.Row="1" Background="#bfa554" Margin="5" Padding="0 10">
                    <Slider Orientation="Vertical" Grid.Row="1" Value="60" />
                </Border>
            </Grid>
        </ScrollViewer>

        <TextBlock Text="{Binding Source={StaticResource PdfSamplesLocalization}, Path=TextBlockTB1_Text}" VerticalAlignment="Center" FontSize="16"/>
        <TextBlock Text="{Binding Source={StaticResource PdfSamplesLocalization}, Path=TextBlockTB2_Text}" Grid.Column="1" VerticalAlignment="Center" FontSize="16"/>
        <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Top" >
            <Button x:Name="btnRender" Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=RenderBT_Content}" Click="btnRender_Click" Margin="5"/>
            <Button x:Name="btnSave" Content="{Binding Source={StaticResource PdfSamplesLocalization}, Path=SavePDFBT_Content}" Click="btnSave_Click" Margin="5"/>
        </StackPanel>
        <c1pdf:C1PdfViewer x:Name="c1PdfViewer1" Grid.Column="1" Grid.Row="1" ViewMode="Fitted" />
        <ProgressRing x:Name="progressRing" Grid.Column="1" Grid.Row="1"/>
    </Grid>
</Page>