ToolWindowContainer Class
Represents a container of one or more tool windows.
[TemplatePart(Name = "PART_Icon", Type = typeof(FrameworkElement))]
[TemplatePart(Name = "PART_OptionsButton", Type = typeof(PopupButton))]
[TemplatePart(Name = "PART_TitleBar", Type = typeof(FrameworkElement))]
[TemplateVisualState(Name = "Active", GroupName = "ActiveStates")]
[TemplateVisualState(Name = "Inactive", GroupName = "ActiveStates")]
[TemplateVisualState(Name = "AutoHide", GroupName = "StateStates")]
[TemplateVisualState(Name = "Docked", GroupName = "StateStates")]
public class ToolWindowContainer : DockingWindowContainerBase, IDockTarget, IOrientedElement
- Inheritance:
- object Visual UIElement FrameworkElement Control DockingWindowContainerBase object
- Implements:
- IDockTarget IOrientedElement
Constructors
ToolWindowContainer()
Initializes an instance of the ToolWindowContainer
class.
public ToolWindowContainer()
Properties
AutoHideCommand
Gets the ICommand that can auto-hide the windows in the container.
public ICommand AutoHideCommand { get; }
Property Value
CloseButtonContentTemplate
Gets or sets the DataTemplate to use for the close button content.
public DataTemplate CloseButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the close button content.
CloseCommand
Gets the ICommand that can close the windows in the container.
public ICommand CloseCommand { get; }
Property Value
DockCommand
Gets the ICommand that can dock the windows in the container.
public ICommand DockCommand { get; }
Property Value
EmbeddedButtonStyle
Gets or sets the Style to use for embedded buttons.
public Style EmbeddedButtonStyle { get; set; }
Property Value
HasCloseButton
Gets or sets whether the container has a title bar close button if the SelectedWindow is closable.
public bool HasCloseButton { get; set; }
Property Value
- bool:
true
if the container has a title bar close button if the SelectedWindow is closable; otherwise,false
. The default value istrue
.
HasTitleBarGripper
Gets or sets whether the titlebar has a gripper.
public bool HasTitleBarGripper { get; set; }
Property Value
- bool:
true
if the titlebar has a gripper; otherwise,false
. The default value isfalse
.
HasTitleBarIcon
Gets or sets whether the container is capable of displaying the selected window's icon in the title bar.
public bool HasTitleBarIcon { get; set; }
Property Value
- bool:
true
if the window is capable of displaying the selected window's icon in the title bar; otherwise,false
. The default value isfalse
.
HasToggleAutoHideButton
Gets or sets whether the container has a title bar toggle auto-hide button if the SelectedWindow can auto-hide.
public bool HasToggleAutoHideButton { get; set; }
Property Value
- bool:
true
if the container has a title bar toggle auto-hide button if the SelectedWindow can auto-hide; otherwise,false
. The default value istrue
.
IsCloseButtonVisible
Gets whether the container's close button is visible.
public bool IsCloseButtonVisible { get; }
Property Value
- bool:
true
if the container's close button is visible; otherwise,false
. The default value istrue
.
IsMaximizeButtonVisible
Gets whether the container's maximize button is visible.
public bool IsMaximizeButtonVisible { get; }
Property Value
- bool:
true
if the container's maximize button is visible; otherwise,false
. The default value isfalse
.
IsMinimizeButtonVisible
Gets whether the container's minimize button is visible.
public bool IsMinimizeButtonVisible { get; }
Property Value
- bool:
true
if the container's minimize button is visible; otherwise,false
. The default value isfalse
.
IsOptionsButtonVisible
Gets whether the container's options button is visible.
public bool IsOptionsButtonVisible { get; }
Property Value
- bool:
true
if the container's options button is visible; otherwise,false
. The default value istrue
.
IsRestoreButtonVisible
Gets whether the container's restore button is visible.
public bool IsRestoreButtonVisible { get; }
Property Value
- bool:
true
if the container's restore button is visible; otherwise,false
. The default value isfalse
.
IsToggleAutoHideButtonVisible
Gets whether the container's toggle auto-hide button is visible.
public bool IsToggleAutoHideButtonVisible { get; }
Property Value
- bool:
true
if the container's toggle auto-hide button is visible; otherwise,false
. The default value istrue
.
MaximizeButtonContentTemplate
Gets or sets the DataTemplate to use for the maximize button content.
public DataTemplate MaximizeButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the maximize button content.
MaximizeCommand
Gets the ICommand that can maximize the window that hosts the container.
public ICommand MaximizeCommand { get; }
Property Value
MenuButtonContentTemplate
Gets or sets the DataTemplate to use for the drop-down menu button content.
public DataTemplate MenuButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the drop-down menu button content.
MinimizeButtonContentTemplate
Gets or sets the DataTemplate to use for the minimize button content.
public DataTemplate MinimizeButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the minimize button content.
MinimizeCommand
Gets the ICommand that can minimize the window that hosts the container.
public ICommand MinimizeCommand { get; }
Property Value
PinButtonContentTemplate
Gets or sets the DataTemplate to use for the pin button content.
public DataTemplate PinButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the pin button content.
RestoreButtonContentTemplate
Gets or sets the DataTemplate to use for the restore button content.
public DataTemplate RestoreButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the restore button content.
RestoreCommand
Gets the ICommand that can restore the window that hosts the container.
public ICommand RestoreCommand { get; }
Property Value
SelectedToolWindow
Gets the ToolWindow that is currently selected in the container.
public ToolWindow SelectedToolWindow { get; }
Property Value
- ToolWindow:
The ToolWindow that is currently selected in the container.
SingleTabLayoutBehavior
Gets or sets the behavior used when a single ToolWindow is in the container.
public SingleTabLayoutBehavior SingleTabLayoutBehavior { get; set; }
Property Value
- SingleTabLayoutBehavior:
The behavior used when a single ToolWindow is in the container.
TitleBarContextContentAlignment
Gets or sets the alignment of title bar context content.
public ContextContentAlignment TitleBarContextContentAlignment { get; set; }
Property Value
- ContextContentAlignment:
The alignment of title bar context content. The default value is
Far
.
TitleBarMinHeight
Gets or sets the title bar minimum height.
TitleFontFamily
Gets or sets the title's font family.
TitleFontSize
Gets or sets the title's font size.
TitleFontWeight
Gets or sets the title's font weight.
public FontWeight TitleFontWeight { get; set; }
Property Value
- FontWeight:
The title's font weight. The default value is
Normal
.
ToggleAutoHideCommand
Gets the ICommand that can toggle the container between an auto-hide and docked state.
public ICommand ToggleAutoHideCommand { get; }
Property Value
UnpinButtonContentTemplate
Gets or sets the DataTemplate to use for the unpin button content.
public DataTemplate UnpinButtonContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for the unpin button content.
Windows
Gets the collection of child DockingWindow objects.
public ObservableCollection<DockingWindow> Windows { get; }
Property Value
- ObservableCollection<DockingWindow>:
The collection of child DockingWindow objects.
Methods
AutoHide()
Auto-hides the contained ToolWindow controls to the outer-edge of the ancestor DockHost.
public void AutoHide()
Remarks
Using this method places the contained ToolWindow controls in an AutoHide
State.
Use the AutoHide(Side) method overload to auto-hide to a specific side.
AutoHide(Side)
Auto-hides the contained ToolWindow controls to the specified outer-edge of the ancestor DockHost.
public void AutoHide(Side side)
Parameter | Type | Description |
---|---|---|
side | Side | A Side indicating the side upon which to auto-hide. |
Remarks
Using this method places the contained ToolWindow controls in an AutoHide
State.
Use the AutoHide() method overload to auto-hide to the control's default side.
Close()
Closes the tool windows in the container, removing them from the layout.
public bool Close()
Returns
- bool:
true
if all tool windows were closed successfully; otherwise,false
.
Dock()
Docks the contained ToolWindow controls back to their default docked location.
public void Dock()
Remarks
Using this method places the contained ToolWindow controls in a Docked
State.
OnApplyTemplate()
Invoked whenever application code or internal processes call ApplyTemplate
.
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns an AutomationPeer object for this control instance.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
An AutomationPeer instance.
OnDockSiteChanged(DockSite, DockSite)
Occurs when the DockSite property is changed.
protected override void OnDockSiteChanged(DockSite oldDockSite, DockSite newDockSite)
Parameter | Type | Description |
---|---|---|
oldDockSite | DockSite | The old value. |
newDockSite | DockSite | The new value. |
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. |
OnTabControlMenuOpening(AdvancedTabControlMenuEventArgs)
Occurs when a menu on the tab control is opening.
protected override void OnTabControlMenuOpening(AdvancedTabControlMenuEventArgs e)
Parameter | Type | Description |
---|---|---|
e | AdvancedTabControlMenuEventArgs | The AdvancedTabControlMenuEventArgs that contains the event data. |
OpenOptionsMenu()
Opens the options menu for the SelectedWindow.
public void OpenOptionsMenu()
OpenOptionsMenu(FrameworkElement)
Opens the options menu for the SelectedWindow under the specified placement target element.
public void OpenOptionsMenu(FrameworkElement placementTarget)
Parameter | Type | Description |
---|---|---|
placementTarget | FrameworkElement | The optional FrameworkElement under which to open the menu. |
UpdateCommands()
Updates the enabled states of the commands.
protected override void UpdateCommands()
UpdateDockingWindowStates()
Updates the DockingWindowState associated with all child docking windows.
protected override void UpdateDockingWindowStates()
UpdateIsTabStripVisible()
Updates the IsTabStripVisible property.
protected override void UpdateIsTabStripVisible()
UpdateTitleBarButtonVisibility()
Updates the title bar button visibility.
protected override void UpdateTitleBarButtonVisibility()
UpdateVisualState(bool)
Updates the visual state.
protected override void UpdateVisualState(bool useTransitions)
Parameter | Type | Description |
---|---|---|
useTransitions | bool | Whether to use transitions. |
ValidateChildType(DockingWindow)
Validates that the specified child DockingWindow type is valid for this container.
protected override void ValidateChildType(DockingWindow window)
Parameter | Type | Description |
---|---|---|
window | DockingWindow | The DockingWindow to examine. |
Fields
CloseButtonContentTemplateProperty
Identifies the CloseButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty CloseButtonContentTemplateProperty
EmbeddedButtonStyleProperty
Identifies the EmbeddedButtonStyle dependency property. This field is read-only.
public static readonly DependencyProperty EmbeddedButtonStyleProperty
HasCloseButtonProperty
Identifies the HasCloseButton dependency property. This field is read-only.
public static readonly DependencyProperty HasCloseButtonProperty
HasTitleBarGripperProperty
Identifies the HasTitleBarGripper dependency property. This field is read-only.
public static readonly DependencyProperty HasTitleBarGripperProperty
HasTitleBarIconProperty
Identifies the HasTitleBarIcon dependency property. This field is read-only.
public static readonly DependencyProperty HasTitleBarIconProperty
HasToggleAutoHideButtonProperty
Identifies the HasToggleAutoHideButton dependency property. This field is read-only.
public static readonly DependencyProperty HasToggleAutoHideButtonProperty
IsCloseButtonVisibleProperty
Identifies the IsCloseButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsCloseButtonVisibleProperty
IsMaximizeButtonVisibleProperty
Identifies the IsMaximizeButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsMaximizeButtonVisibleProperty
IsMinimizeButtonVisibleProperty
Identifies the IsMinimizeButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsMinimizeButtonVisibleProperty
IsOptionsButtonVisibleProperty
Identifies the IsOptionsButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsOptionsButtonVisibleProperty
IsRestoreButtonVisibleProperty
Identifies the IsRestoreButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsRestoreButtonVisibleProperty
IsToggleAutoHideButtonVisibleProperty
Identifies the IsToggleAutoHideButtonVisible dependency property. This field is read-only.
public static readonly DependencyProperty IsToggleAutoHideButtonVisibleProperty
MaximizeButtonContentTemplateProperty
Identifies the MaximizeButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty MaximizeButtonContentTemplateProperty
MenuButtonContentTemplateProperty
Identifies the MenuButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty MenuButtonContentTemplateProperty
MinimizeButtonContentTemplateProperty
Identifies the MinimizeButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty MinimizeButtonContentTemplateProperty
PinButtonContentTemplateProperty
Identifies the PinButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty PinButtonContentTemplateProperty
RestoreButtonContentTemplateProperty
Identifies the RestoreButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty RestoreButtonContentTemplateProperty
SingleTabLayoutBehaviorProperty
Identifies the SingleTabLayoutBehavior dependency property. This field is read-only.
public static readonly DependencyProperty SingleTabLayoutBehaviorProperty
TitleBarContextContentAlignmentProperty
Identifies the TitleBarContextContentAlignment dependency property. This field is read-only.
public static readonly DependencyProperty TitleBarContextContentAlignmentProperty
TitleBarMinHeightProperty
Identifies the TitleBarMinHeight dependency property. This field is read-only.
public static readonly DependencyProperty TitleBarMinHeightProperty
TitleFontFamilyProperty
Identifies the TitleFontFamily dependency property. This field is read-only.
public static readonly DependencyProperty TitleFontFamilyProperty
TitleFontSizeProperty
Identifies the TitleFontSize dependency property. This field is read-only.
public static readonly DependencyProperty TitleFontSizeProperty
TitleFontWeightProperty
Identifies the TitleFontWeight dependency property. This field is read-only.
public static readonly DependencyProperty TitleFontWeightProperty
UnpinButtonContentTemplateProperty
Identifies the UnpinButtonContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty UnpinButtonContentTemplateProperty
Inherited Members
- DockingWindowContainerBase.CanTabsCloseOnMiddleClickProperty
- DockingWindowContainerBase.HasTabImagesProperty
- DockingWindowContainerBase.IsActiveProperty
- DockingWindowContainerBase.IsTabLayoutAnimationEnabledProperty
- DockingWindowContainerBase.IsTabLayoutAnimationEnabledResolvedProperty
- DockingWindowContainerBase.IsTabStripVisibleProperty
- DockingWindowContainerBase.MaxTabExtentProperty
- DockingWindowContainerBase.MinTabExtentProperty
- DockingWindowContainerBase.SelectedWindowProperty
- DockingWindowContainerBase.StateProperty
- DockingWindowContainerBase.TabControlStyleProperty
- DockingWindowContainerBase.TabItemContainerStyleProperty
- DockingWindowContainerBase.TabOverflowBehaviorProperty
- DockingWindowContainerBase.TabStripPlacementProperty
- DockingWindowContainerBase.OnSelectedWindowChanged(DockingWindow, DockingWindow)
- DockingWindowContainerBase.OnWindowsChanged(NotifyCollectionChangedEventArgs)
- DockingWindowContainerBase.ToString()
- DockingWindowContainerBase.OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
- DockingWindowContainerBase.CanTabsCloseOnMiddleClick
- DockingWindowContainerBase.DockHost
- DockingWindowContainerBase.DockSite
- DockingWindowContainerBase.HasTabImages
- DockingWindowContainerBase.IsActive
- DockingWindowContainerBase.IsTabLayoutAnimationEnabled
- DockingWindowContainerBase.IsTabLayoutAnimationEnabledResolved
- DockingWindowContainerBase.IsTabStripVisible
- DockingWindowContainerBase.LogicalChildren
- DockingWindowContainerBase.MaxTabExtent
- DockingWindowContainerBase.MinTabExtent
- DockingWindowContainerBase.SelectedWindow
- DockingWindowContainerBase.State
- DockingWindowContainerBase.TabControl
- DockingWindowContainerBase.TabControlStyle
- DockingWindowContainerBase.TabItemContainerStyle
- DockingWindowContainerBase.TabOverflowBehavior
- DockingWindowContainerBase.TabStripPlacement
- DockingWindowContainerBase.WindowsCore