SearchViewBase Class
Provides the abstract base class for a view with editor-searching UI.
public abstract class SearchViewBase : UIControl, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable
- Inheritance:
- object MarshalByRefObject Component Control ScrollableControl UIControl object
- Derived:
- SearchOverlayPane
- Implements:
- IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable
Constructors
SearchViewBase()
Initializes an instance of the SearchViewBase
class.
protected SearchViewBase()
Properties
CanToggleReplace
Gets or sets whether replace UI can be toggled visible by the end user.
public bool CanToggleReplace { get; set; }
Property Value
- bool:
true
if replace UI can be toggled visible by the end user; otherwise,false
. The default value istrue
.
FindAllButton
Gets the find all button.
protected abstract CommandButton FindAllButton { get; }
Property Value
- CommandButton:
The find all button.
FindAllCommand
Gets the ICommand that performs a find all operation.
public ICommand FindAllCommand { get; }
Property Value
FindNextCommand
Gets the ICommand that performs a find next operation.
public ICommand FindNextCommand { get; }
Property Value
FindWhatTextBox
Gets or sets the TextBox
in the template.
HasNoSearchResults
Gets or sets whether there are no search results for the current find text.
public bool HasNoSearchResults { get; set; }
Property Value
- bool:
true
if there are no search results for the current find text; otherwise,false
. The default value isfalse
.
Remarks
When true
, some search UI may show an indicator that there is no search match.
IsFindAllButtonVisible
Gets or sets whether the find all button is visible.
public bool IsFindAllButtonVisible { get; set; }
Property Value
- bool:
true
if the find all button; otherwise,false
. The default value isfalse
.
IsOptionsPanelExpanded
Gets or sets whether the options panel is currently visible.
public bool IsOptionsPanelExpanded { get; set; }
Property Value
- bool:
true
if the options panel is currently visible; otherwise,false
. The default value isfalse
.
IsReplaceVisible
Gets or sets whether replace UI is currently visible.
public bool IsReplaceVisible { get; set; }
Property Value
- bool:
true
if replace UI is currently visible; otherwise,false
. The default value isfalse
.
MatchCaseButton
Gets the match case button.
protected abstract CommandButton MatchCaseButton { get; }
Property Value
- CommandButton:
The match case button.
MatchWholeWordButton
Gets the match whole word button.
protected abstract CommandButton MatchWholeWordButton { get; }
Property Value
- CommandButton:
The match whole word button.
ModeToggleButton
Gets the mode toggle button.
protected abstract CommandButton ModeToggleButton { get; }
Property Value
- CommandButton:
The mode toggle button.
ReplaceAllButton
Gets the replace all button.
protected abstract CommandButton ReplaceAllButton { get; }
Property Value
- CommandButton:
The replace all button.
ReplaceAllCommand
Gets the ICommand that performs a replace all operation.
public ICommand ReplaceAllCommand { get; }
Property Value
ReplaceNextButton
Gets the replace next button.
protected abstract CommandButton ReplaceNextButton { get; }
Property Value
- CommandButton:
The replace next button.
ReplaceNextCommand
Gets the ICommand that performs a replace next operation.
public ICommand ReplaceNextCommand { get; }
Property Value
ReplaceWithTextBox
Gets the TextBox
in the template.
SearchOptions
Gets or sets the IEditorSearchOptions that specifies the search options to use.
public IEditorSearchOptions SearchOptions { get; set; }
Property Value
- IEditorSearchOptions:
The IEditorSearchOptions that specifies the search options to use.
SearchPatternProviderFactory
Gets or sets the ISearchPatternProviderFactory that creates the collection of available search pattern providers.
public ISearchPatternProviderFactory SearchPatternProviderFactory { get; set; }
Property Value
- ISearchPatternProviderFactory:
The ISearchPatternProviderFactory that creates the collection of available search pattern providers.
SearchPatternProviders
Gets the read-only collection of available ISearchPatternProvider objects.
public ReadOnlyCollection<ISearchPatternProvider> SearchPatternProviders { get; }
Property Value
- ReadOnlyCollection<ISearchPatternProvider>:
The read-only collection of available ISearchPatternProvider objects.
Remarks
Change the SearchPatternProviderFactory property value to update this collection.
SearchScopeComboBox
Gets the search scope combobox.
protected abstract ComboBox SearchScopeComboBox { get; }
Property Value
- ComboBox:
The search scope combobox.
SearchUpButton
Gets the search up button.
protected abstract CommandButton SearchUpButton { get; }
Property Value
- CommandButton:
The search up button.
TargetView
Gets the target IEditorView in which the searching will occur.
public abstract IEditorView TargetView { get; }
Property Value
- IEditorView:
The target IEditorView in which the searching will occur.
ToggleMatchCaseCommand
Gets the ICommand that toggles the match case setting.
public ICommand ToggleMatchCaseCommand { get; }
Property Value
ToggleMatchWholeWordCommand
Gets the ICommand that toggles the match whole word setting.
public ICommand ToggleMatchWholeWordCommand { get; }
Property Value
ToggleModeCommand
Gets the ICommand that toggles replace mode setting.
public ICommand ToggleModeCommand { get; }
Property Value
ToggleOptionsPanelExpandedCommand
Gets the ICommand that performs a replace next operation.
public ICommand ToggleOptionsPanelExpandedCommand { get; }
Property Value
ToggleSearchUpCommand
Gets the ICommand that toggles the search up setting.
public ICommand ToggleSearchUpCommand { get; }
Property Value
ToggleUseRegularExpressionsCommand
Gets the ICommand that toggles the use regular expressions setting.
public ICommand ToggleUseRegularExpressionsCommand { get; }
Property Value
UseRegularExpressions
Gets or sets whether to use regular expressions for searching.
public bool UseRegularExpressions { get; set; }
Property Value
- bool:
true
if regular expressions should be used for searching; otherwise,false
. The default value isfalse
.
Remarks
Setting this property will toggle the PatternProvider between RegularExpression and Normal.
UseRegularExpressionsButton
Gets the use regular expressions button.
protected abstract CommandButton UseRegularExpressionsButton { get; }
Property Value
- CommandButton:
The use regular expressions button.
Methods
ArrangeChildren()
Arranges the children.
protected abstract void ArrangeChildren()
FocusFindWhatTextBox()
Attempts to select all and focus the find-what TextBox.
InitializeChildren()
Initializes the children.
protected virtual void InitializeChildren()
NotifyPropertyChanged(string)
Notifies that a property has changed.
protected void NotifyPropertyChanged(string propertyName)
Parameter | Type | Description |
---|---|---|
propertyName | string | The name of the property that was changed. |
OnCanToggleReplacePropertyChanged(bool, bool)
Occurs when the CanToggleReplace property is changed.
protected virtual void OnCanToggleReplacePropertyChanged(bool oldValue, bool newValue)
Parameter | Type | Description |
---|---|---|
oldValue | bool | The old value. |
newValue | bool | The new value. |
OnFindSearchOptionsChanged()
Occurs when a search option is changed that may affect find results, such as those used for search result highlighting.
protected virtual void OnFindSearchOptionsChanged()
OnFindWhatTextBoxKeyDown(KeyEventArgs)
Occurs when a key is pressed.
protected virtual void OnFindWhatTextBoxKeyDown(KeyEventArgs e)
Parameter | Type | Description |
---|---|---|
e | KeyEventArgs | A KeyEventArgs that contains the event data. |
OnIsFindAllButtonVisiblePropertyChanged(bool, bool)
Occurs when the IsFindAllButtonVisible property is changed.
protected virtual void OnIsFindAllButtonVisiblePropertyChanged(bool oldValue, bool newValue)
Parameter | Type | Description |
---|---|---|
oldValue | bool | The old value. |
newValue | bool | The new value. |
OnIsOptionsPanelExpandedPropertyChanged(bool, bool)
Occurs when the IsOptionsPanelExpanded property is changed.
protected virtual void OnIsOptionsPanelExpandedPropertyChanged(bool oldValue, bool newValue)
Parameter | Type | Description |
---|---|---|
oldValue | bool | The old value. |
newValue | bool | The new value. |
OnIsReplaceVisiblePropertyChanged(bool, bool)
Occurs when the IsReplaceVisible property is changed.
protected virtual void OnIsReplaceVisiblePropertyChanged(bool oldValue, bool newValue)
Parameter | Type | Description |
---|---|---|
oldValue | bool | The old value. |
newValue | bool | The new value. |
OnPaddingChanged(EventArgs)
Occurs when the padding is changed.
protected override void OnPaddingChanged(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | The |
OnPropertyChanged(PropertyChangedEventArgs)
Raises the PropertyChanged event.
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | PropertyChangedEventArgs | The PropertyChangedEventArgs that contains the event data. |
OnReplaceWithTextBoxKeyDown(KeyEventArgs)
Occurs when a key is pressed.
protected virtual void OnReplaceWithTextBoxKeyDown(KeyEventArgs e)
Parameter | Type | Description |
---|---|---|
e | KeyEventArgs | A KeyEventArgs that contains the event data. |
OnResize(EventArgs)
Raises the Resize
event.
protected override void OnResize(EventArgs e)
Parameter | Type | Description |
---|---|---|
e | EventArgs | An |
OnSearchOptionsChanged()
Occurs when the search options have changed.
protected virtual void OnSearchOptionsChanged()
OnSearchOptionsPropertyChanged(IEditorSearchOptions, IEditorSearchOptions)
Occurs when the SearchOptions property is changed.
protected virtual void OnSearchOptionsPropertyChanged(IEditorSearchOptions oldValue, IEditorSearchOptions newValue)
Parameter | Type | Description |
---|---|---|
oldValue | IEditorSearchOptions | The old value. |
newValue | IEditorSearchOptions | The new value. |
OnSearchOptionsPropertyChanged(PropertyChangedEventArgs)
Occurs when a property on the SearchOptions changes.
protected virtual void OnSearchOptionsPropertyChanged(PropertyChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | PropertyChangedEventArgs | The PropertyChangedEventArgs that contains the event data. |
OnSearchPatternProviderFactoryPropertyChanged(ISearchPatternProviderFactory, ISearchPatternProviderFactory)
Occurs when the SearchPatternProviderFactory property is changed.
protected virtual void OnSearchPatternProviderFactoryPropertyChanged(ISearchPatternProviderFactory oldValue, ISearchPatternProviderFactory newValue)
Parameter | Type | Description |
---|---|---|
oldValue | ISearchPatternProviderFactory | The old value. |
newValue | ISearchPatternProviderFactory | The new value. |
OnSearchScopeChanged()
Occurs when the search scope has changed.
protected virtual void OnSearchScopeChanged()
OnSearching(SearchOperationType)
Occurs before a search operation is executed by the end user.
protected virtual void OnSearching(SearchOperationType operationType)
Parameter | Type | Description |
---|---|---|
operationType | SearchOperationType | A SearchOperationType that indicates the search operation type. |
OnUseRegularExpressionsPropertyChanged(bool, bool)
Occurs when the UseRegularExpressions property is changed.
protected virtual void OnUseRegularExpressionsPropertyChanged(bool oldValue, bool newValue)
Parameter | Type | Description |
---|---|---|
oldValue | bool | The old value. |
newValue | bool | The new value. |
RaiseCanExecuteChangedForCommands()
Raise the can-execute changed events for commands.
protected virtual void RaiseCanExecuteChangedForCommands()
Events
PropertyChanged
Occurs when a property has been changed.
SearchOptionsChanged
Occurs when the search options or one of its properties have changed.
Inherited Members
- UIControl.Dispose(bool)
- UIControl.AddPendingGraphicsInversion(Rectangle)
- UIControl.AddPendingScrollOperation(Rectangle, Orientation, int)
- UIControl.AddPendingScrollOperation(Rectangle, int, int)
- UIControl.AddToInvalidatedRegion()
- UIControl.AddToInvalidatedRegion(Rectangle)
- UIControl.Arrange(Rectangle)
- UIControl.ArrangeOverride(Size)
- UIControl.ContainsLocation(Point)
- UIControl.CreateChildren()
- UIControl.DpiScaleChanged(SizeF)
- UIControl.GetCursor(Point)
- UIControl.Invalidate(InvalidationLevels, InvalidationTypes)
- UIControl.InvalidateArrange()
- UIControl.InvalidateMeasure()
- UIControl.Measure(Graphics, Size)
- UIControl.MeasureOverride(Graphics, Size)
- UIControl.OnClick(EventArgs)
- UIControl.OnDoubleClick(EventArgs)
- UIControl.OnDpiChangedAfterParent(EventArgs)
- UIControl.OnHandleCreated(EventArgs)
- UIControl.OnLayout(LayoutEventArgs)
- UIControl.OnLocationChanged(EventArgs)
- UIControl.OnMouseCaptureChanged(EventArgs)
- UIControl.OnMouseDown(MouseEventArgs)
- UIControl.OnMouseEnter(EventArgs)
- UIControl.OnMouseHover(EventArgs)
- UIControl.OnMouseLeave(EventArgs)
- UIControl.OnMouseMove(MouseEventArgs)
- UIControl.OnMouseUp(MouseEventArgs)
- UIControl.OnMouseWheel(MouseEventArgs)
- UIControl.OnPaint(PaintEventArgs)
- UIControl.OnPaintBackground(PaintEventArgs)
- UIControl.OnParentChanged()
- UIControl.OnParentChanged(EventArgs)
- UIControl.OnRender(PaintEventArgs)
- UIControl.OnRenderChildElements(PaintEventArgs)
- UIControl.OnRightToLeftChanged(EventArgs)
- UIControl.OnVisibleChanged(EventArgs)
- UIControl.Render(PaintEventArgs)
- UIControl.ResetDoubleBufferCanvas(bool)
- UIControl.ResumePainting()
- UIControl.SuspendPainting()
- UIControl.TransformToAncestor(IUIElement)
- UIControl.TransformToDescendant(IUIElement)
- UIControl.UpdateCursor()
- UIControl.UpdateLayout()
- UIControl.ActualHeight
- UIControl.ActualWidth
- UIControl.BackColor
- UIControl.BackgroundImage
- UIControl.CaptureMouseWhenPressed
- UIControl.ClipBounds
- UIControl.DesiredSize
- UIControl.DpiScaleFactor
- UIControl.Font
- UIControl.ForeColor
- UIControl.IsArrangeValid
- UIControl.IsMeasureValid
- UIControl.IsPaintValid
- UIControl.IsRightToLeft
- UIControl.LastMouseUpButton
- UIControl.PaintingSuspended
- UIControl.UseControlGraphicsForMeasure
- UIControl.UseExtendedDoubleBuffering
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()