In This Article

SearchOverlayPane Class

Represents an IOverlayPane implementation that can be used to perform searching within an editor.

public class SearchOverlayPane : SearchViewBase, IOverlayPane, IKeyedObject
Inheritance:
object Visual UIElement FrameworkElement Control SearchViewBase object
Implements:
IOverlayPane IKeyedObject

Constructors

SearchOverlayPane(IEditorView)

Initializes an instance of the class.

public SearchOverlayPane(IEditorView view)
Parameter Type Description
view IEditorView

The view that owns the pane.

Properties

CloseCommand

The ICommand that closes the pane.

public ICommand CloseCommand { get; }

Property Value

ICommand

ControlKeyDownOpacity

The opacity of the pane while the control key is pressed.

public double ControlKeyDownOpacity { get; set; }

Property Value

double:

A recommended value is 0.25.

Remarks

Set the value to 1.0 to prevent opacity changes when the control key is pressed.

InstanceKind

The OverlayPaneInstanceKind that indicates how many instances of the pane are permitted across all views.

public virtual OverlayPaneInstanceKind InstanceKind { get; }

Property Value

OverlayPaneInstanceKind:

The default value is Single.

Key

The string-based key that identifies the object.

public string Key { get; }

Property Value

string

TargetView

The target IEditorView in which the searching will occur.

public override IEditorView TargetView { get; }

Property Value

IEditorView

VisualElement

The UIElement that is used to visually render the pane.

public UIElement VisualElement { get; }

Property Value

UIElement

Methods

Activate()

Activates the pane, called when the pane is already open to perform tasks like moving focus into itself.

public void Activate()

ApplyStringResources()

Updates the UI strings based on the string resources.

public void ApplyStringResources()

Close()

Closes the pane.

public void Close()

OnClosed()

Occurs when the pane is closed.

protected virtual void OnClosed()

OnFindSearchOptionsChanged()

Occurs when a search option is changed that may affect find results, such as those used for search result highlighting.

protected override void OnFindSearchOptionsChanged()

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

Invoked just before the IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event.

protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e DependencyPropertyChangedEventArgs

A System.Windows.DependencyPropertyChangedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The KeyEventArgs that contains the event data.

OnSearchScopeChanged()

Occurs when the search scope has changed.

protected override void OnSearchScopeChanged()

Events

Closed

Occurs when the pane is closed.

public event EventHandler? Closed

Event Type

EventHandler

Fields

ControlKeyDownOpacityProperty

Defines the ControlKeyDownOpacity property.

public static readonly DependencyProperty ControlKeyDownOpacityProperty

Inherited Members

Extension Methods