123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <UserControl x:Class="ComPDFKitDemo.BOTA.WholeDocumentSearchControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:ComPDFKitDemo.BOTA"
- mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="../Resources/StyleResource.xaml"/>
- </ResourceDictionary.MergedDictionaries>
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid Name="LayoutRoot" Background="White">
- <Grid Name="WholeDocumentSearchGrid">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="*" />
- <ColumnDefinition Width="Auto" />
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0" Grid.Row="0">
- <TextBox Margin="5,5,0,5" Name="SearchTextBox" KeyDown="SearchTextBox_KeyDown"></TextBox>
- </Grid>
- <Grid Grid.Column="1" Grid.Row="0">
- <Button Margin="5,5,2,5" Name="SearchButton" Width="Auto" Click="SearchButton_Click">
- <Image Source="../Resources/bullet_magnify.png" Height="16"/>
- <ToolTipService.ToolTip>
- <ToolTip Placement="Bottom">
- <TextBlock Text="Search"/>
- </ToolTip>
- </ToolTipService.ToolTip>
- </Button>
- </Grid>
- <!--Search Options-->
- <Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2">
- <StackPanel Orientation="Vertical">
- <CheckBox Name="WholeWordCheckBox" Content="Whole Word Only" Margin="4"/>
- <CheckBox Name="CaseSensitiveCheckBox" Content="Case Sensitive" Margin="4" />
- </StackPanel>
- </Grid>
- <!--Searching Status-->
- <Grid Grid.Row="2" Grid.Column="0">
- <ProgressBar Grid.Column="0" Name="_progressBar" Height="20" Margin="5,0,0,0"/>
- </Grid>
- <Grid Grid.Row="2" Grid.Column="1">
- <Button Margin="5,5,2,5" Name="CancelSearch" Width="Auto" IsEnabled="False" Click="CancelSearch_Click">
- <Image Source="../Resources/cross.png" Height="16"/>
- <ToolTipService.ToolTip>
- <ToolTip Placement="Bottom">
- <TextBlock Text="Stop"/>
- </ToolTip>
- </ToolTipService.ToolTip>
- </Button>
- </Grid>
- <Grid Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="2">
- <TextBlock Name="_summary" Margin="4" TextWrapping="Wrap" FontWeight="Bold"/>
- </Grid>
- <Grid Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2">
- <ListBox Name="ListSearchResults" SelectionMode="Single" SelectionChanged="ListSearchResults_SelectionChanged">
- <ListBox.ItemContainerStyle>
- <Style TargetType="{x:Type ListBoxItem}">
- <Setter Property="HorizontalContentAlignment" Value="Left"/>
- <Setter Property="VerticalContentAlignment" Value="Center"/>
- </Style>
- </ListBox.ItemContainerStyle>
- <ListBox.ContextMenu>
- <ContextMenu>
- <MenuItem Header="Highlight" Click="CommandBind_Executed" Tag="Highlight"></MenuItem>
- <MenuItem Header="Underline" Click="CommandBind_Executed" Tag="Underline"></MenuItem>
- <MenuItem Header="Strikeout" Click="CommandBind_Executed" Tag="Strikeout"></MenuItem>
- <MenuItem Header="Squiggly" Click="CommandBind_Executed" Tag="Squiggly"></MenuItem>
- </ContextMenu>
- </ListBox.ContextMenu>
- </ListBox>
- </Grid>
- </Grid>
- </Grid>
- </UserControl>
|