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 StandardSwitcher
class.
public StandardSwitcher()
Properties
AreDocumentsVisible
Gets or sets a value indicating whether the documents are visible in the switcher.
public bool AreDocumentsVisible { get; set; }
Property Value
- bool:
true
if the documents are visible in the switcher; otherwisefalse
. The default value istrue
.
AreToolWindowsVisible
Gets or sets a value indicating whether the tool windows are visible in the switcher.
public bool AreToolWindowsVisible { get; set; }
Property Value
- bool:
true
if the tool windows are visible in the switcher; otherwisefalse
. The default value istrue
.
DocumentsColumnTitle
Gets or sets the text to use for the documents column title.
[Localizability(LocalizationCategory.Title)]
public string DocumentsColumnTitle { get; set; }
Property Value
- string:
The text to use for the documents column title.
FooterTemplate
Gets or sets the DataTemplate to use for the footer area of the switcher, whose content is the SelectedWindow.
public DataTemplate FooterTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the footer area of the switcher.
HeaderTemplate
Gets or sets the DataTemplate to use for the header area of the switcher, whose content is the SelectedWindow.
public DataTemplate HeaderTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the header area of the switcher.
ItemContainerStyle
Gets or sets the Style to use for rendering items.
public Style ItemContainerStyle { get; set; }
Property Value
ItemTemplate
Gets or sets the DataTemplate to use for rendering items.
public DataTemplate ItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for rendering items.
MaxDocumentColumnCount
Gets or sets the maximum number of document columns to display.
public int MaxDocumentColumnCount { get; set; }
Property Value
- int:
The maximum number of document columns to display. The default value is
3
.
MaxRowCount
Gets or sets the maximum number of item rows that can be displayed.
public int MaxRowCount { get; set; }
Property Value
- int:
The maximum number of item rows that can be displayed. The default value is
15
.
ScrollButtonStyle
Gets or sets the Style to use for a scroll button.
public Style ScrollButtonStyle { get; set; }
Property Value
ScrollDownButtonContentTemplate
Gets or sets the DataTemplate to use for the scroll down button content.
public DataTemplate ScrollDownButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the scroll down button content.
ScrollUpButtonContentTemplate
Gets or sets the DataTemplate to use for the scroll up button content.
public DataTemplate ScrollUpButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the scroll up button content.
ShadowElevation
Gets or sets the shadow elevation.
public int ShadowElevation { get; set; }
Property Value
- int:
The shadow elevation. The default value is
8
.
Remarks
Set this property to 0
to disable the shadow.
ToolWindowsColumnTitle
Gets or sets the text to use for the tool windows column title.
[Localizability(LocalizationCategory.Title)]
public string ToolWindowsColumnTitle { get; set; }
Property Value
- string:
The text to use for the tool windows column title.
Methods
OnApplyTemplate()
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 an AutomationPeer object for this control instance.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
An AutomationPeer instance.
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. |
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
Identifies the AreDocumentsVisible dependency property. This field is read-only.
public static readonly DependencyProperty AreDocumentsVisibleProperty
AreToolWindowsVisibleProperty
Identifies the AreToolWindowsVisible dependency property. This field is read-only.
public static readonly DependencyProperty AreToolWindowsVisibleProperty
DocumentsColumnTitleProperty
Identifies the DocumentsColumnTitle dependency property. This field is read-only.
public static readonly DependencyProperty DocumentsColumnTitleProperty
FooterTemplateProperty
Identifies the FooterTemplate dependency property. This field is read-only.
public static readonly DependencyProperty FooterTemplateProperty
HeaderTemplateProperty
Identifies the HeaderTemplate dependency property. This field is read-only.
public static readonly DependencyProperty HeaderTemplateProperty
ItemContainerStyleProperty
Identifies the ItemContainerStyle dependency property. This field is read-only.
public static readonly DependencyProperty ItemContainerStyleProperty
ItemTemplateProperty
Identifies the ItemTemplate dependency property. This field is read-only.
public static readonly DependencyProperty ItemTemplateProperty
MaxDocumentColumnCountProperty
Identifies the MaxDocumentColumnCount dependency property. This field is read-only.
public static readonly DependencyProperty MaxDocumentColumnCountProperty
MaxRowCountProperty
Identifies the MaxRowCount dependency property. This field is read-only.
public static readonly DependencyProperty MaxRowCountProperty
ScrollButtonStyleProperty
Identifies the ScrollButtonStyle dependency property. This field is read-only.
public static readonly DependencyProperty ScrollButtonStyleProperty
ScrollDownButtonContentTemplateProperty
Identifies the ScrollDownButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty ScrollDownButtonContentTemplateProperty
ScrollUpButtonContentTemplateProperty
Identifies the ScrollUpButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty ScrollUpButtonContentTemplateProperty
ShadowElevationProperty
Identifies the ShadowElevation dependency property. This field is read-only.
public static readonly DependencyProperty ShadowElevationProperty
ToolWindowsColumnTitleProperty
Identifies the ToolWindowsColumnTitle dependency property. This field is read-only.
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.IsActivationKey(KeyEventArgs)
- SwitcherBase.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- SwitcherBase.OnKeyUp(KeyEventArgs)
- 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