<Window x:Class="PdfiumViewer.WPFDemo.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:PdfiumViewer.WPFDemo"
        mc:Ignorable="d" Loaded="Window_Loaded" Closed="Window_Closed"
        Title="MainWindow" Height="600" Width="800">

    <Grid >
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition />
            <RowDefinition Height="30" />
            <RowDefinition Height="30" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>

        <Label x:Name="labelMemDC" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2" />

        <Button Click="LoadPDFButton_Click" Content="Load PDF" Grid.ColumnSpan="2"/>
        <Button Click="RenderToMemDCButton_Click" Content="Start Rendering by MemDC" Grid.Row="1" Grid.ColumnSpan="2" />

        <Label Content="RenderPage with Memory Device Context" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2" Background="LightGoldenrodYellow"/>

        <Image  x:Name="imageMemDC" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2"/>

        <StackPanel Grid.Row="5" Orientation="Horizontal">
            <TextBox x:Name="searchValueTextBox" Text="Enter value to search"   VerticalAlignment="Center" Width="150"/>
            <CheckBox x:Name="matchCaseCheckBox" Content="Match CaSe" VerticalAlignment="Center" Margin="5,0"/>
            <CheckBox x:Name="wholeWordOnlyCheckBox" Content="Whole Word Only" VerticalAlignment="Center" Margin="5,0"/>
        </StackPanel>

        <Button Content="Search" Grid.Row="6" Click="DoSearch_Click"/>

        <TextBox x:Name="searchResultLabel" Grid.Row="5" Grid.RowSpan="2" Grid.Column="1" />
    </Grid>
</Window>
