In This Article

SwitcherBase Class

Provides the base class for a component that provides Ctrl+Tab-like switching of docking windows.

public abstract class SwitcherBase : Control, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient
Inheritance:
Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control Object
Derived:
SimpleSwitcher StandardSwitcher

Constructors

SwitcherBase(Boolean)

Initializes a new instance of the SwitcherBase class.

protected SwitcherBase(bool canSortByLastFocusedDateTime)
Parameter Type Description
canSortByLastFocusedDateTime Boolean

Whether to sort docking windows by last focused date/time.

Properties

DockSite

Gets the DockSite for which the switcher is currently active.

public DockSite DockSite { get; }

Property Value

DockSite:

The DockSite for which the switcher is currently active.

Documents

Gets the collection of open documents in the MDI area.

public ReadOnlyDockingWindowCollection Documents { get; }

Property Value

ReadOnlyDockingWindowCollection:

The collection of open documents in the MDI area.

IsOpen

Gets whether the switcher is currently open and active.

public bool IsOpen { get; }

Property Value

Boolean:

true if the switcher is currently open and active; otherwise, false.

SelectedWindow

Gets or sets the DockingWindow that is currently selected.

public DockingWindow SelectedWindow { get; set; }

Property Value

DockingWindow:

The DockingWindow that is currently selected.

SelectNextDocumentKeyGesture

Gets or sets 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

Gets or sets the KeyGesture that is used to invoke the SelectNextToolWindow() method by default.

public KeyGesture SelectNextToolWindowKeyGesture { get; set; }

Property Value

KeyGesture:

The KeyGesture that is used to invoke the SelectNextToolWindow() method by default. The default value is Alt+F7.

SelectPreviousDocumentKeyGesture

Gets or sets the KeyGesture that is used to invoke the SelectPreviousDocument() method by default.

public KeyGesture SelectPreviousDocumentKeyGesture { get; set; }

Property Value

KeyGesture:

The KeyGesture that is used to invoke the SelectPreviousDocument() method by default. The default value is Ctrl+Shift+Tab.

SelectPreviousToolWindowKeyGesture

Gets or sets the KeyGesture that is used to invoke the SelectPreviousToolWindow() method by default.

public KeyGesture SelectPreviousToolWindowKeyGesture { get; set; }

Property Value

KeyGesture:

The KeyGesture that is used to invoke the SelectPreviousToolWindow() method by default. The default value is Shift+Alt+F7.

ToolWindows

Gets the collection of open tool windows that are not in the MDI area.

public ReadOnlyToolWindowCollection ToolWindows { get; }

Property Value

ReadOnlyToolWindowCollection:

The collection of open tool windows that are not in the MDI area.

Methods

Close()

Closes the switcher.

public void Close()

CreatePopup()

Creates a Popup that can be used to host this switcher.

protected virtual Popup CreatePopup()

Returns

Popup:

The Popup that was created.

IsActivationKey(KeyEventArgs)

Returns whether the specified key is a key combination that can activate the switcher.

protected virtual bool IsActivationKey(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

A KeyEventArgs that contains the event data.

Returns

Boolean:

true if the key combination can activate the switcher; otherwise, false.

OnClosed()

Invoked when the switcher is closed.

protected virtual void OnClosed()

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

Reports that the IsKeyboardFocusWithin property changed.

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

A DependencyPropertyChangedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

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

The KeyEventArgs that contains the event data.

OnKeyUp(KeyEventArgs)

Occurs when a key is released.

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

A KeyEventArgs that contains the event data.

OnLostFocus(RoutedEventArgs)

Occurs when the control loses focus.

protected override void OnLostFocus(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

The RoutedEventArgs that contains the event data.

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

Identifies the DockSite dependency property. This field is read-only.

public static readonly DependencyProperty DockSiteProperty

IsOpenProperty

Identifies the IsOpen dependency property. This field is read-only.

public static readonly DependencyProperty IsOpenProperty

SelectedWindowProperty

Identifies the SelectedWindow dependency property. This field is read-only.

public static readonly DependencyProperty SelectedWindowProperty

SelectNextDocumentKeyGestureProperty

Identifies the SelectNextDocumentKeyGesture dependency property. This field is read-only.

public static readonly DependencyProperty SelectNextDocumentKeyGestureProperty

SelectNextToolWindowKeyGestureProperty

Identifies the SelectNextToolWindowKeyGesture dependency property. This field is read-only.

public static readonly DependencyProperty SelectNextToolWindowKeyGestureProperty

SelectPreviousDocumentKeyGestureProperty

Identifies the SelectPreviousDocumentKeyGesture dependency property. This field is read-only.

public static readonly DependencyProperty SelectPreviousDocumentKeyGestureProperty

SelectPreviousToolWindowKeyGestureProperty

Identifies the SelectPreviousToolWindowKeyGesture dependency property. This field is read-only.

public static readonly DependencyProperty SelectPreviousToolWindowKeyGestureProperty

Inherited Members

Extension Methods