OverlayPaneBase Class
Provides a base implementation for an implementation of an IOverlayPane.
public abstract class OverlayPaneBase : ContentControl, IOverlayPane, IKeyedObject
- Inheritance:
- object Visual UIElement FrameworkElement Control ContentControl object
- Implements:
- IOverlayPane IKeyedObject
Constructors
OverlayPaneBase(string)
Initializes an instance of the class.
public OverlayPaneBase(string key)
Parameter | Type | Description |
---|---|---|
key | string | The string-based key that identifies the overlay pane. |
Properties
AllowTabKeyToMoveFocus
Gets or sets if the Tab
and Shift+Tab
key combinations are used to move focus.
public virtual bool AllowTabKeyToMoveFocus { get; }
Property Value
- bool:
true
to allow theTab
andShift+Tab
key combinations to move focus; otherwisefalse
to allow the ancestor SyntaxEditor control to handle the key. The default value istrue
.
See Also
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.
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, Key) method to customize which keys are handled by the pane.
See Also
OnMoveFocus(bool)
When AllowTabKeyToMoveFocus is set to true
, this method is called to attempts to move focus from the currently
focused element to the next/previous element.
protected virtual void OnMoveFocus(bool isForward)
Parameter | Type | Description |
---|---|---|
isForward | bool |
|
See Also
ProcessKeyDown(ModifierKeys, Key)
Handles keystrokes like Tab
and Shift+Tab
so the ancestor SyntaxEditor doesn't execute default
edit actions associated with those keys, such as indent or outdent.
protected virtual bool ProcessKeyDown(ModifierKeys modifierKeys, Key key)
Parameter | Type | Description |
---|---|---|
modifierKeys | ModifierKeys | The modifier keys, if any, that are currently pressed. |
key | Key | The key to examine. |
Returns
- bool:
true
if the key was handled; otherwise,false
to allow the ancestor SyntaxEditor to handle the key.
Events
Closed
Occurs when the pane is closed.