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 class.
protected SearchViewBase()
Properties
CanToggleReplace
Indicates whether replace UI can be toggled visible by the end user.
public bool CanToggleReplace { get; set; }
Property Value
- bool:
trueif replace UI can be toggled visible by the end user; otherwise,false. The default value istrue.
FindAllButton
The find all button.
FindAllCommand
The ICommand that performs a find all operation.
FindNextCommand
The ICommand that performs a find next operation.
FindWhatTextBox
The TextBox in the template.
HasNoSearchResults
Indicates whether there are no search results for the current find text.
public bool HasNoSearchResults { get; set; }
Property Value
- bool:
trueif 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
Indicates whether the find all button is visible.
public bool IsFindAllButtonVisible { get; set; }
Property Value
- bool:
trueif the find all button; otherwise,false. The default value isfalse.
IsOptionsPanelExpanded
Indicates whether the options panel is currently visible.
public bool IsOptionsPanelExpanded { get; set; }
Property Value
- bool:
trueif the options panel is currently visible; otherwise,false. The default value isfalse.
IsReplaceVisible
Indicates whether replace UI is currently visible.
public bool IsReplaceVisible { get; set; }
Property Value
- bool:
trueif replace UI is currently visible; otherwise,false. The default value isfalse.
MatchCaseButton
The match case button.
MatchWholeWordButton
The match whole word button.
ModeToggleButton
The mode toggle button.
ReplaceAllButton
The replace all button.
ReplaceAllCommand
The ICommand that performs a replace all operation.
ReplaceNextButton
The replace next button.
ReplaceNextCommand
The ICommand that performs a replace next operation.
ReplaceWithTextBox
The TextBox in the template.
SearchOptions
The IEditorSearchOptions that specifies the search options to use.
SearchPatternProviderFactory
The ISearchPatternProviderFactory that creates the collection of available search pattern providers.
public ISearchPatternProviderFactory SearchPatternProviderFactory { get; set; }
Property Value
SearchPatternProviders
The read-only collection of available ISearchPatternProvider objects.
public ReadOnlyCollection<ISearchPatternProvider> SearchPatternProviders { get; }
Property Value
Remarks
Change the SearchPatternProviderFactory property value to update this collection.
SearchScopeComboBox
The search scope combobox.
SearchUpButton
The search up button.
TargetView
The target IEditorView in which the searching will occur.
ToggleMatchCaseCommand
The ICommand that toggles the match case setting.
ToggleMatchWholeWordCommand
The ICommand that toggles the match whole word setting.
ToggleModeCommand
The ICommand that toggles replace mode setting.
ToggleOptionsPanelExpandedCommand
The ICommand that toggles if the options panel is expanded.
ToggleSearchUpCommand
The ICommand that toggles the search up setting.
ToggleUseRegularExpressionsCommand
The ICommand that toggles the use regular expressions setting.
UseRegularExpressions
Indicates whether to use regular expressions for searching.
public bool UseRegularExpressions { get; set; }
Property Value
- bool:
trueif 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
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()
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 | 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)
Raises the PaddingChanged event.
protected override void OnPaddingChanged(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | An EventArgs that contains the event data. |
OnPropertyChanged(PropertyChangedEventArgs)
Raises the PropertyChanged event.
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | PropertyChangedEventArgs | The event data. |
OnPropertyChanged(string?)
Raises the PropertyChanged event.
protected void OnPropertyChanged(string? propertyName = null)
| Parameter | Type | Description |
|---|---|---|
| propertyName | string | (Optional) The name of the property that changed. |
OnReplaceWithTextBoxKeyDown(KeyEventArgs)
Occurs when a key is pressed.
protected virtual void OnReplaceWithTextBoxKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The event data. |
OnResize(EventArgs)
Raises the Resize event.
protected override void OnResize(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | An EventArgs that contains the event data. |
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 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()
SetProperty<T>(ref T, T, string?)
Called from a property setter to change the backing field's value and raise PropertyChanged notification events if the new value is not equal to the current value.
protected bool SetProperty<T>(ref T field, T newValue, string? propertyName = null)
- Type Parameters:
-
T-The type of the property that changed.
| Parameter | Type | Description |
|---|---|---|
| field | T | The backing field that holds the property's value, which may be updated. |
| newValue | T | The new property value. |
| propertyName | string | (Optional) The name of the property that changed. |
Returns
- bool:
trueif the property was changed; otherwise,false.
Events
PropertyChanged
Occurs when a property value changes.
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.HitTest(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, bool>)
- UIControl.HitTestRecursive(PointHitTestParameters, Func<IUIElement, PointHitTestParameters, bool>)
- 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.UpdateCursor(Point)
- 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()