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.
AreToolWindowsVisible
Indicates whether the tool windows are visible in the switcher.
DocumentsColumnTitle
The text to use for the documents column title.
[Localizability(LocalizationCategory.Title)]
public string? DocumentsColumnTitle { get; set; }
Property Value
FooterTemplate
The DataTemplate to use for the footer area of the switcher, whose content is the SelectedWindow.
HeaderTemplate
The DataTemplate to use for the header area of the switcher, whose content is the SelectedWindow.
ItemContainerStyle
The Style to use for rendering items.
ItemTemplate
The DataTemplate to use for rendering items.
MaxDocumentColumnCount
The maximum number of document columns to display.
MaxRowCount
The maximum number of item rows that can be displayed.
ScrollButtonStyle
The Style to use for a scroll button.
ScrollDownButtonContentTemplate
The DataTemplate to use for the scroll down button content.
ScrollUpButtonContentTemplate
The DataTemplate to use for the scroll up button content.
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
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
- SwitcherBase.DockSiteProperty
- SwitcherBase.IsOpenProperty
- SwitcherBase.SelectedWindowProperty
- SwitcherBase.SelectNextDocumentKeyGestureProperty
- SwitcherBase.SelectNextToolWindowKeyGestureProperty
- SwitcherBase.SelectPreviousDocumentKeyGestureProperty
- SwitcherBase.SelectPreviousToolWindowKeyGestureProperty
- SwitcherBase.Close()
- SwitcherBase.CreatePopup()
- SwitcherBase.GetOrderedDocuments()
- SwitcherBase.GetOrderedToolWindows()
- SwitcherBase.IsActivationKey(KeyEventArgs)
- SwitcherBase.OnKeyUp(KeyEventArgs)
- SwitcherBase.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- SwitcherBase.OnLostFocus(RoutedEventArgs)
- SwitcherBase.SelectNextDocument()
- SwitcherBase.SelectNextToolWindow()
- SwitcherBase.SelectPreviousDocument()
- SwitcherBase.SelectPreviousToolWindow()
- SwitcherBase.DockSite
- SwitcherBase.Documents
- SwitcherBase.IsOpen
- SwitcherBase.SelectedWindow
- SwitcherBase.ToolWindows
- SwitcherBase.SelectNextDocumentKeyGesture
- SwitcherBase.SelectNextToolWindowKeyGesture
- SwitcherBase.SelectPreviousDocumentKeyGesture
- SwitcherBase.SelectPreviousToolWindowKeyGesture