<Page
    x:Class="RuntimeTableCreation.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:viewer="using:Stimulsoft.Report.Viewer.UWP">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition x:Name="column1" Width="450"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>

        <Grid Margin="4,4,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="5"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>

            <Button Content="Create Report" HorizontalAlignment="Stretch" Click="buttonCreateReport_Click"/>
            <Border Grid.Row="1" Height="1" Margin="0,2,0,2" HorizontalAlignment="Stretch" Background="White"/>

            <StackPanel Grid.Row="2">
                <StackPanel>
                    <TextBlock FontSize="14" Text="Auto Width:"/>
                    <RadioButton Name="rbAWNone" Margin="0,6,0,0" Content="None" IsChecked="True"/>
                    <RadioButton Name="rbAWTable" Margin="0,14,0,14" Content="Table"/>
                    <RadioButton Name="rbAWPage" Content="Page"/>
                </StackPanel>
                <Border Width="120" Height="1" Margin="0,10,0,10" HorizontalAlignment="Left" Background="White"/>
                <StackPanel>
                    <TextBlock FontSize="14" Text="Auto Width Type:"/>
                    <RadioButton Name="rbAWTNone" Margin="0,6,0,0" Content="None" IsChecked="True"/>
                    <RadioButton Name="rbAWTFullTable" Margin="0,14,0,14" Content="Full Table"/>
                    <RadioButton Name="rbAWTLastColumns" Content="Last Columns"/>
                </StackPanel>
                <Border Width="120" Height="1" Margin="0,16,0,10" HorizontalAlignment="Left" Background="White"/>
            </StackPanel>

            <StackPanel Grid.Row="3" HorizontalAlignment="Left" Orientation="Horizontal">
                <Button Name="buttonResize" Width="70" Margin="0,0,10,0" Click="buttonResize_Click"/>

                <Button Content="Add" Click="buttonAddItem_Click"/>
                <Button Name="buttonRemove" Content="Remove" Click="buttonRemove_Click"/>
            </StackPanel>

            <ScrollViewer Grid.Row="4" ZoomMode="Disabled">
                <StackPanel Name="panelItems" Margin="0,0,15,0"/>
            </ScrollViewer>
        </Grid>

        <viewer:StiViewerControl x:Name="viewerControl" Grid.Column="1"/>
    </Grid>
</Page>