In This Article

StandardSwitcher Class

Implements a SwitcherBase that is similar to the switcher found in Visual Studio.

[TemplatePart(Name = "PART_ItemsPanel", Type = typeof(Grid))]
public class StandardSwitcher : SwitcherBase
Inheritance:
object Visual UIElement FrameworkElement Control SwitcherBase object

Constructors

StandardSwitcher()

Initializes an instance of the class.

public StandardSwitcher()

Properties

AreDocumentsVisible

Indicates whether the documents are visible in the switcher.

public bool AreDocumentsVisible { get; set; }

Property Value

bool:

The default value is true.

AreToolWindowsVisible

Indicates whether the tool windows are visible in the switcher.

public bool AreToolWindowsVisible { get; set; }

Property Value

bool:

The default value is true.

DocumentsColumnTitle

The text to use for the documents column title.

[Localizability(LocalizationCategory.Title)]
public string? DocumentsColumnTitle { get; set; }

Property Value

string

FooterTemplate

The DataTemplate to use for the footer area of the switcher, whose content is the SelectedWindow.

public DataTemplate? FooterTemplate { get; set; }

Property Value

DataTemplate

HeaderTemplate

The DataTemplate to use for the header area of the switcher, whose content is the SelectedWindow.

public DataTemplate? HeaderTemplate { get; set; }

Property Value

DataTemplate

ItemContainerStyle

The Style to use for rendering items.

public Style? ItemContainerStyle { get; set; }

Property Value

Style

ItemTemplate

The DataTemplate to use for rendering items.

public DataTemplate? ItemTemplate { get; set; }

Property Value

DataTemplate

MaxDocumentColumnCount

The maximum number of document columns to display.

public int MaxDocumentColumnCount { get; set; }

Property Value

int:

The default value is 3.

MaxRowCount

The maximum number of item rows that can be displayed.

public int MaxRowCount { get; set; }

Property Value

int:

The default value is 15.

ScrollButtonStyle

The Style to use for a scroll button.

public Style? ScrollButtonStyle { get; set; }

Property Value

Style

ScrollDownButtonContentTemplate

The DataTemplate to use for the scroll down button content.

public DataTemplate? ScrollDownButtonContentTemplate { get; set; }

Property Value

DataTemplate

ScrollUpButtonContentTemplate

The DataTemplate to use for the scroll up button content.

public DataTemplate? ScrollUpButtonContentTemplate { get; set; }

Property Value

DataTemplate

ShadowElevation

The shadow elevation.

public int ShadowElevation { get; set; }

Property Value

int:

The default value is 8.

Remarks

Set this property to 0 to disable the shadow.

ToolWindowsColumnTitle

The text to use for the tool windows column title.

[Localizability(LocalizationCategory.Title)]
public string? ToolWindowsColumnTitle { get; set; }

Property Value

string

Methods

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnClosed()

Invoked when the switcher is closed.

protected override void OnClosed()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

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.

OnOpened()

Invoked when the switcher is opened.

protected override void OnOpened()

OnSelectedWindowChanged(DockingWindow?, DockingWindow?)

Occurs when the SelectedWindow property is changed.

protected override void OnSelectedWindowChanged(DockingWindow? oldValue, DockingWindow? newValue)
Parameter Type Description
oldValue DockingWindow

The old value.

newValue DockingWindow

The new value.

Fields

AreDocumentsVisibleProperty

Defines the AreDocumentsVisible property.

public static readonly DependencyProperty AreDocumentsVisibleProperty

AreToolWindowsVisibleProperty

Defines the AreToolWindowsVisible property.

public static readonly DependencyProperty AreToolWindowsVisibleProperty

DocumentsColumnTitleProperty

Defines the DocumentsColumnTitle property.

public static readonly DependencyProperty DocumentsColumnTitleProperty

FooterTemplateProperty

Defines the FooterTemplate property.

public static readonly DependencyProperty FooterTemplateProperty

HeaderTemplateProperty

Defines the HeaderTemplate property.

public static readonly DependencyProperty HeaderTemplateProperty

ItemContainerStyleProperty

Defines the ItemContainerStyle property.

public static readonly DependencyProperty ItemContainerStyleProperty

ItemTemplateProperty

Defines the ItemTemplate property.

public static readonly DependencyProperty ItemTemplateProperty

MaxDocumentColumnCountProperty

Defines the MaxDocumentColumnCount property.

public static readonly DependencyProperty MaxDocumentColumnCountProperty

MaxRowCountProperty

Defines the MaxRowCount property.

public static readonly DependencyProperty MaxRowCountProperty

ScrollButtonStyleProperty

Defines the ScrollButtonStyle property.

public static readonly DependencyProperty ScrollButtonStyleProperty

ScrollDownButtonContentTemplateProperty

Defines the ScrollDownButtonContentTemplate property.

public static readonly DependencyProperty ScrollDownButtonContentTemplateProperty

ScrollUpButtonContentTemplateProperty

Defines the ScrollUpButtonContentTemplate property.

public static readonly DependencyProperty ScrollUpButtonContentTemplateProperty

ShadowElevationProperty

Defines the ShadowElevation property.

public static readonly DependencyProperty ShadowElevationProperty

ToolWindowsColumnTitleProperty

Defines the ToolWindowsColumnTitle property.

public static readonly DependencyProperty ToolWindowsColumnTitleProperty

Inherited Members

Extension Methods