In This Article

OverlayPaneBase Class

Provides a base implementation for an implementation of an IOverlayPane.

public abstract class OverlayPaneBase : UIControl, IUIControl, IUIElement, ILogicalTreeNode, IDpiAwareElement, IDisposable, IOverlayPane, IKeyedObject
Inheritance:
object MarshalByRefObject Component Control ScrollableControl UIControl object
Implements:
IUIControl IUIElement ILogicalTreeNode IDpiAwareElement IDisposable IOverlayPane IKeyedObject

Constructors

OverlayPaneBase(string, IEditorView)

Initializes an instance of the class.

public OverlayPaneBase(string key, IEditorView view)
Parameter Type Description
key string

The string-based key that identifies the overlay pane.

view IEditorView

The editor view where the overlay pane will be displayed.

Properties

AllowEscKeyToClose

Gets whether to allow the Esc key to close the overlay pane.

public virtual bool AllowEscKeyToClose { get; }

Property Value

bool:

true if the Esc key can close the overlay pane; otherwise, false.

BorderStyle

Gets the border style for the overlay pane.

protected virtual SimpleBorderStyle BorderStyle { get; }

Property Value

SimpleBorderStyle:

A SimpleBorderStyle value indicating the border style.

ColorScheme

Gets the resolved color scheme to use when rendering.

protected IWindowsColorScheme ColorScheme { get; }

Property Value

IWindowsColorScheme:

A IWindowsColorScheme that defines the colors to use when rendering.

ControlKeyDownOpacity

Gets or sets the opacity of the pane while the control key is pressed.

public virtual double ControlKeyDownOpacity { get; }

Property Value

double:

The opacity of the pane while the control key is pressed. A default value is 0.25.

Remarks

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

InstanceKind

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

public virtual OverlayPaneInstanceKind InstanceKind { get; }

Property Value

OverlayPaneInstanceKind:

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

TargetView

Gets the target IEditorView in which the overlay pane will be displayed.

protected IEditorView TargetView { get; }

Property Value

IEditorView:

The target IEditorView in which the overlay pane will be displayed.

Methods

Activate()

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

public virtual void Activate()

Close()

Closes the pane.

public virtual void Close()

OnClosed()

Raises the Closed event.

protected virtual void OnClosed()

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

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

A KeyEventArgs that contains the event data.

Remarks

Override the ProcessKeyDown(ModifierKeys, Keys) method to customize which keys are handled by the pane.

See Also

OnRender(PaintEventArgs)

Renders the element.

protected override void OnRender(PaintEventArgs e)
Parameter Type Description
e PaintEventArgs

A PaintEventArgs that contains the event data.

ProcessCmdKey(ref Message, Keys)

Processes a command key.

protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
Parameter Type Description
msg Message

The message.

keyData Keys

The key data to examine.

Returns

bool:

true if the specified key is processed; otherwise, false.

ProcessDialogKey(Keys)

Processes a dialog key.

protected override bool ProcessDialogKey(Keys keyData)
Parameter Type Description
keyData Keys

The key data to examine.

Returns

bool:

true if the specified key is processed; otherwise, false.

ProcessKeyDown(ModifierKeys, Keys)

Handles keystrokes like Esc, Tab, and Shift+Tab.

protected virtual bool ProcessKeyDown(ModifierKeys modifierKeys, Keys key)
Parameter Type Description
modifierKeys ModifierKeys

The modifier keys, if any, that are currently pressed.

key Keys

The key to examine.

Returns

bool:

true if the key was handled; otherwise, false to allow default processing of the key.

Events

Closed

Occurs when the pane is closed.

public event EventHandler Closed

Event Type

EventHandler

Inherited Members