
Is there a way to change the Glyphs used for Quick Find and Quick Replace on the EditorSearchView?
Can the Glyphs and Text be turned on or off if I want to display only text or only the glyph on those buttons?
Thanks
Is there a way to change the Glyphs used for Quick Find and Quick Replace on the EditorSearchView?
Can the Glyphs and Text be turned on or off if I want to display only text or only the glyph on those buttons?
Thanks
Hi Bob,
Sorry but the only way to change those would be to clone the EditorSearchView Template and update it yourself to change them. Here's the default Style:
<Style x:Key="{x:Type editorPrimitives:EditorSearchView}" TargetType="{x:Type editorPrimitives:EditorSearchView}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="editorPrimitives:EditorSearchView">
<ControlTemplate.Resources>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
</ControlTemplate.Resources>
<StackPanel>
<shared:PixelSnapper>
<ToolBar x:Name="modeToolBar" Visibility="Collapsed" KeyboardNavigation.TabNavigation="Continue" TabIndex="98"
themes:ThemeProperties.UseAlternateStyle="True">
<RadioButton x:Name="findModeButton" GroupName="Mode"
CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Command="{x:Static editorPrimitives:EditorSearchView.SetModeCommand}"
CommandParameter="{x:Static editorPrimitives:EditorSearchMode.Find}" TabIndex="99">
<StackPanel Orientation="Horizontal">
<Image Width="16" Height="16" Stretch="Uniform" VerticalAlignment="Center"
Source="pack://application:,,,/ActiproSoftware.SyntaxEditor.Wpf;component/Products/SyntaxEditor/Images/Find16.png" />
<TextBlock Margin="3,0,0,0" Text="{productsEditor:SRExtension UIEditorSearchViewFindModeText}" VerticalAlignment="Center" />
</StackPanel>
</RadioButton>
<Separator />
<RadioButton x:Name="replaceModeButton" GroupName="Mode"
CommandTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
Command="{x:Static editorPrimitives:EditorSearchView.SetModeCommand}"
CommandParameter="{x:Static editorPrimitives:EditorSearchMode.Replace}" TabIndex="100">
<StackPanel Orientation="Horizontal">
<Image Width="16" Height="16" Stretch="Uniform" VerticalAlignment="Center"
Source="pack://application:,,,/ActiproSoftware.SyntaxEditor.Wpf;component/Products/SyntaxEditor/Images/Replace16.png" />
<TextBlock Margin="3,0,0,0" Text="{productsEditor:SRExtension UIEditorSearchViewReplaceModeText}" VerticalAlignment="Center" />
</StackPanel>
</RadioButton>
</ToolBar>
</shared:PixelSnapper>
<StackPanel x:Name="contentPanel" Margin="{TemplateBinding Padding}">
<shared:PixelSnapper>
<StackPanel>
<Label Content="{productsEditor:SRExtension UIEditorSearchViewFindWhatLabelText}" Target="{Binding ElementName=PART_FindWhatTextBox}" Padding="0" />
<TextBox x:Name="PART_FindWhatTextBox" Margin="0,1,0,0" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchOptions.FindText, UpdateSourceTrigger=PropertyChanged}" />
<shared:AnimatedExpanderDecorator x:Name="replaceWithExpander" ExpandDuration="{TemplateBinding AnimationDuration}" CollapseDuration="{TemplateBinding AnimationDuration}">
<StackPanel>
<Label Margin="0,5,0,0" Content="{productsEditor:SRExtension UIEditorSearchViewReplaceWithLabelText}" Target="{Binding ElementName=PART_ReplaceWithTextBox}" Padding="0" />
<TextBox x:Name="PART_ReplaceWithTextBox" Margin="0,1,0,0" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchOptions.ReplaceText, UpdateSourceTrigger=PropertyChanged}" />
</StackPanel>
</shared:AnimatedExpanderDecorator>
<Label Margin="0,5,0,0" Content="{productsEditor:SRExtension UIEditorSearchViewSearchScopeLabelText}" Target="{Binding ElementName=searchScopeComboBox}" Padding="0" />
<ComboBox x:Name="searchScopeComboBox" Margin="0,1,0,0" SelectedValue="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchOptions.Scope}" SelectedValuePath="Tag">
<ComboBoxItem Tag="{x:Static editor:EditorSearchScope.Document}" Content="{productsEditor:SRExtension UIEditorSearchScopeDocumentText}" />
<ComboBoxItem Tag="{x:Static editor:EditorSearchScope.Selection}" Content="{productsEditor:SRExtension UIEditorSearchScopeSelectionText}" />
</ComboBox>
</StackPanel>
</shared:PixelSnapper>
<shared:AnimatedExpander Margin="0,7,0,0" Header="{productsEditor:SRExtension UIEditorSearchViewFindOptionsExpanderHeaderText}"
Template="{StaticResource ExpanderTemplate}"
ExpandDuration="{TemplateBinding AnimationDuration}" CollapseDuration="{TemplateBinding AnimationDuration}"
IsExpanded="{TemplateBinding IsOptionsPanelExpanded}"
BorderBrush="{DynamicResource {x:Static themes:AssetResourceKeys.GroupBoxBorderNormalBrushKey}}">
<StackPanel Margin="7">
<CheckBox Content="{productsEditor:SRExtension UIEditorSearchViewMatchCaseCheckBoxText}"
IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchOptions.MatchCase}" />
<CheckBox Margin="0,5,0,0" Content="{productsEditor:SRExtension UIEditorSearchViewMatchWholeWordCheckBoxText}"
IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchOptions.MatchWholeWord}" />
<CheckBox Margin="0,5,0,0" Content="{productsEditor:SRExtension UIEditorSearchViewSearchUpCheckBoxText}"
IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchOptions.SearchUp}" />
<Label Margin="0,5,0,0" Content="{productsEditor:SRExtension UIEditorSearchViewSearchTypeLabelText}" Target="{Binding ElementName=searchTypeComboBox}" Padding="0" />
<ComboBox x:Name="searchTypeComboBox" Margin="0,1,0,0"
SelectedItem="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchOptions.PatternProvider}"
ItemsSource="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=SearchPatternProviders}" VerticalAlignment="Center">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=(textSearching:ISearchPatternProvider.Description)}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</StackPanel>
</shared:AnimatedExpander>
<StackPanel Margin="0,7,0,0" Orientation="Horizontal" HorizontalAlignment="Right">
<Button MinWidth="80" Content="{productsEditor:SRExtension UIEditorSearchViewFindNextButtonText}"
Command="{x:Static editorPrimitives:EditorSearchView.FindNextCommand}" />
<shared:AnimatedExpanderDecorator x:Name="replaceNextExpander" ExpandDirection="Left" ExpandDuration="{TemplateBinding AnimationDuration}" CollapseDuration="{TemplateBinding AnimationDuration}">
<Button Margin="3,0,0,0" MinWidth="80" Content="{productsEditor:SRExtension UIEditorSearchViewReplaceNextButtonText}"
Command="{x:Static editorPrimitives:EditorSearchView.ReplaceNextCommand}" />
</shared:AnimatedExpanderDecorator>
</StackPanel>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
<Button Margin="0,3,0,0" MinWidth="80" Content="{productsEditor:SRExtension UIEditorSearchViewFindAllButtonText}"
Command="{x:Static editorPrimitives:EditorSearchView.FindAllCommand}"
Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsFindAllButtonVisible, Converter={StaticResource BooleanToVisibilityConverter}}" />
<shared:AnimatedExpanderDecorator x:Name="replaceAllExpander" ExpandDirection="Left" ExpandDuration="{TemplateBinding AnimationDuration}" CollapseDuration="{TemplateBinding AnimationDuration}">
<Button Margin="3,3,0,0" MinWidth="80" HorizontalAlignment="Right"
Content="{productsEditor:SRExtension UIEditorSearchViewReplaceAllButtonText}"
Command="{x:Static editorPrimitives:EditorSearchView.ReplaceAllCommand}" />
</shared:AnimatedExpanderDecorator>
</StackPanel>
</StackPanel>
</StackPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsModeToolBarVisible" Value="True">
<Setter TargetName="modeToolBar" Property="Visibility" Value="Visible" />
<Setter Property="Padding" Value="7" />
</Trigger>
<Trigger Property="Mode" Value="Find">
<Setter TargetName="findModeButton" Property="IsChecked" Value="True" />
</Trigger>
<Trigger Property="Mode" Value="Replace">
<Setter TargetName="replaceModeButton" Property="IsChecked" Value="True" />
<Setter TargetName="replaceWithExpander" Property="IsExpanded" Value="True" />
<Setter TargetName="replaceNextExpander" Property="IsExpanded" Value="True" />
<Setter TargetName="replaceAllExpander" Property="IsExpanded" Value="True" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Please log in to a validated account to post comments.