SwitcherBase Class
Provides the base class for a component that provides Ctrl+Tab-like switching of docking windows.
public abstract class SwitcherBase : Control
- Inheritance:
- object Visual UIElement FrameworkElement Control object
- Derived:
- SimpleSwitcher StandardSwitcher
Constructors
SwitcherBase(bool)
Initializes an instance of the class.
protected SwitcherBase(bool canSortByLastFocusedDateTime)
| Parameter | Type | Description |
|---|---|---|
| canSortByLastFocusedDateTime | bool | Whether to sort docking windows by last focused date/time. |
Properties
DockSite
The DockSite for which the switcher is currently active.
Documents
The collection of open documents in the MDI area.
public ReadOnlyDockingWindowCollection Documents { get; }
Property Value
IsOpen
Indicates whether the switcher is currently open and active.
SelectNextDocumentKeyGesture
The KeyGesture that is used to invoke the SelectNextDocument() method by default.
public KeyGesture? SelectNextDocumentKeyGesture { get; set; }
Property Value
- KeyGesture:
The KeyGesture that is used to invoke the SelectNextDocument() method by default. The default value is
Ctrl+Tab.
SelectNextToolWindowKeyGesture
The KeyGesture that is used to invoke the SelectNextToolWindow() method by default.
public KeyGesture? SelectNextToolWindowKeyGesture { get; set; }
Property Value
- KeyGesture:
The default value is
Alt+F7.
SelectPreviousDocumentKeyGesture
The KeyGesture that is used to invoke the SelectPreviousDocument() method by default.
public KeyGesture? SelectPreviousDocumentKeyGesture { get; set; }
Property Value
- KeyGesture:
The default value is
Ctrl+Shift+Tab.
SelectPreviousToolWindowKeyGesture
The KeyGesture that is used to invoke the SelectPreviousToolWindow() method by default.
public KeyGesture? SelectPreviousToolWindowKeyGesture { get; set; }
Property Value
- KeyGesture:
The default value is
Shift+Alt+F7.
SelectedWindow
The DockingWindow that is currently selected.
ToolWindows
The collection of open tool windows that are not in the MDI area.
public ReadOnlyToolWindowCollection ToolWindows { get; }
Property Value
Methods
Close()
Closes the switcher.
public void Close()
CreatePopup()
Creates and returns a Popup that can be used to host this switcher.
GetOrderedDocuments()
Returns an ordered enumeration of document windows to display in the switcher.
protected virtual IEnumerable<DockingWindow>? GetOrderedDocuments()
Returns
Remarks
Override in a subclass to customize the switcher's document ordering.
GetOrderedToolWindows()
Returns an ordered enumeration of tool windows to display in the switcher.
protected virtual IEnumerable<ToolWindow>? GetOrderedToolWindows()
Returns
Remarks
Override in a subclass to customize the switcher's tool window ordering.
IsActivationKey(KeyEventArgs)
Returns whether the event args define a key combination that can activate the switcher.
protected virtual bool IsActivationKey(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The event data. |
Returns
OnClosed()
Invoked when the switcher is closed.
protected virtual void OnClosed()
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. |
OnKeyUp(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.KeyUp 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 OnKeyUp(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
OnLostFocus(RoutedEventArgs)
Raises the LostFocus routed event by using the event data that is provided.
protected override void OnLostFocus(RoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | RoutedEventArgs | A RoutedEventArgs that contains event data. This event data must contain the identifier for the LostFocus event. |
OnOpened()
Invoked when the switcher is opened.
protected virtual void OnOpened()
OnSelectedWindowChanged(DockingWindow?, DockingWindow?)
Occurs when the SelectedWindow property is changed.
protected virtual void OnSelectedWindowChanged(DockingWindow? oldValue, DockingWindow? newValue)
| Parameter | Type | Description |
|---|---|---|
| oldValue | DockingWindow | The old value. |
| newValue | DockingWindow | The new value. |
SelectNextDocument()
Selects the next document in the switcher.
protected virtual void SelectNextDocument()
SelectNextToolWindow()
Selects the next tool window in the switcher.
protected virtual void SelectNextToolWindow()
SelectPreviousDocument()
Selects the previous document in the switcher.
protected virtual void SelectPreviousDocument()
SelectPreviousToolWindow()
Selects the previous tool window in the switcher.
protected virtual void SelectPreviousToolWindow()
Fields
DockSiteProperty
Defines the DockSite property.
public static readonly DependencyProperty DockSiteProperty
IsOpenProperty
Defines the IsOpen property.
public static readonly DependencyProperty IsOpenProperty
SelectNextDocumentKeyGestureProperty
Defines the SelectNextDocumentKeyGesture property.
public static readonly DependencyProperty SelectNextDocumentKeyGestureProperty
SelectNextToolWindowKeyGestureProperty
Defines the SelectNextToolWindowKeyGesture property.
public static readonly DependencyProperty SelectNextToolWindowKeyGestureProperty
SelectPreviousDocumentKeyGestureProperty
Defines the SelectPreviousDocumentKeyGesture property.
public static readonly DependencyProperty SelectPreviousDocumentKeyGestureProperty
SelectPreviousToolWindowKeyGestureProperty
Defines the SelectPreviousToolWindowKeyGesture property.
public static readonly DependencyProperty SelectPreviousToolWindowKeyGestureProperty
SelectedWindowProperty
Defines the SelectedWindow property.
public static readonly DependencyProperty SelectedWindowProperty