Free cookie consent management tool by TermsFeed Policy Generator

source: branches/2929_PrioritizedGrammarEnumeration/HeuristicLab.ExtLibs/HeuristicLab.AvalonEdit/5.0.1/AvalonEdit-5.0.1/Search/SearchPanel.xaml @ 16452

Last change on this file since 16452 was 11700, checked in by jkarder, 10 years ago

#2077: created branch and added first version

File size: 3.2 KB
Line 
1<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:search="clr-namespace:ICSharpCode.AvalonEdit.Search">
3  <Style TargetType="search:SearchPanel">
4    <Setter Property="Template">
5      <Setter.Value>
6        <ControlTemplate TargetType="{x:Type search:SearchPanel}">
7          <Border Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" BorderThickness="1" HorizontalAlignment="Right" VerticalAlignment="Top" Cursor="Arrow">
8            <StackPanel Orientation="Horizontal">
9              <TextBox Name="PART_searchTextBox" Focusable="True" Width="150" Height="24" Margin="3,3,3,0">
10                <TextBox.Text>
11                  <Binding Path="SearchPattern" RelativeSource="{RelativeSource TemplatedParent}" UpdateSourceTrigger="PropertyChanged">
12                    <Binding.ValidationRules>
13                      <ExceptionValidationRule />
14                    </Binding.ValidationRules>
15                  </Binding>
16                </TextBox.Text>
17              </TextBox>
18              <search:DropDownButton Height="24">
19                <search:DropDownButton.DropDownContent>
20                  <Popup StaysOpen="False">
21                    <Border Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}" BorderBrush="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}" BorderThickness="1">
22                      <StackPanel Orientation="Vertical">
23                        <CheckBox IsChecked="{Binding MatchCase, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Localization.MatchCaseText, RelativeSource={RelativeSource TemplatedParent}}" Margin="3" />
24                        <CheckBox IsChecked="{Binding WholeWords, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Localization.MatchWholeWordsText, RelativeSource={RelativeSource TemplatedParent}}" Margin="3" />
25                        <CheckBox IsChecked="{Binding UseRegex, RelativeSource={RelativeSource TemplatedParent}}" Content="{Binding Localization.UseRegexText, RelativeSource={RelativeSource TemplatedParent}}" Margin="3" />
26                      </StackPanel>
27                    </Border>
28                  </Popup>
29                </search:DropDownButton.DropDownContent>
30              </search:DropDownButton>
31              <Button Margin="3" Height="24" Width="24" Command="search:SearchCommands.FindPrevious" ToolTip="{Binding Localization.FindPreviousText, RelativeSource={RelativeSource TemplatedParent}}">
32                <Image Width="16" Height="16" Stretch="Fill" Source="prev.png" />
33              </Button>
34              <Button Margin="3" Height="24" Width="24" Command="search:SearchCommands.FindNext" ToolTip="{Binding Localization.FindNextText, RelativeSource={RelativeSource TemplatedParent}}">
35                <Image Width="16" Height="16" Stretch="Fill" Source="next.png" />
36              </Button>
37              <Button Height="16" Width="16" HorizontalAlignment="Right" VerticalAlignment="Top" Command="search:SearchCommands.CloseSearchPanel"
38                      VerticalContentAlignment="Center" HorizontalContentAlignment="Center">
39                <Path Data="M 0,0 L 8,8 M 8,0 L 0,8" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" />
40              </Button>
41            </StackPanel>
42          </Border>
43        </ControlTemplate>
44      </Setter.Value>
45    </Setter>
46  </Style>
47</ResourceDictionary>
Note: See TracBrowser for help on using the repository browser.