In This Article

ToolWindowContainer Class

Represents a container of one or more tool windows.

[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, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IActiveContainer, IBreadcrumbContainer, IHierarchyContainer, IHierarchyNode, ITabbedDockTarget, IDragDockTarget, IDockTarget, IOrientedElement
Inheritance:
Object DispatcherObject DependencyObject 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

ICommand:

The ICommand that can auto-hide the windows in the container.

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

ICommand:

The ICommand that can close the windows in the container.

DockCommand

Gets the ICommand that can dock the windows in the container.

public ICommand DockCommand { get; }

Property Value

ICommand:

The ICommand that can dock the windows in the container.

EmbeddedButtonStyle

Gets or sets the Style to use for embedded buttons.

public Style EmbeddedButtonStyle { get; set; }

Property Value

Style:

The Style to use for embedded buttons.

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

Boolean:

true if the container has a title bar close button if the SelectedWindow is closable; otherwise, false. The default value is true.

HasTitleBarGripper

Gets or sets whether the titlebar has a gripper.

public bool HasTitleBarGripper { get; set; }

Property Value

Boolean:

true if the titlebar has a gripper; otherwise, false. The default value is false.

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

Boolean:

true if the window is capable of displaying the selected window's icon in the title bar; otherwise, false. The default value is false.

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

Boolean:

true if the container has a title bar toggle auto-hide button if the SelectedWindow can auto-hide; otherwise, false. The default value is true.

IsCloseButtonVisible

Gets whether the container's close button is visible.

public bool IsCloseButtonVisible { get; }

Property Value

Boolean:

true if the container's close button is visible; otherwise, false. The default value is true.

IsMaximizeButtonVisible

Gets whether the container's maximize button is visible.

public bool IsMaximizeButtonVisible { get; }

Property Value

Boolean:

true if the container's maximize button is visible; otherwise, false. The default value is false.

IsMinimizeButtonVisible

Gets whether the container's minimize button is visible.

public bool IsMinimizeButtonVisible { get; }

Property Value

Boolean:

true if the container's minimize button is visible; otherwise, false. The default value is false.

IsOptionsButtonVisible

Gets whether the container's options button is visible.

public bool IsOptionsButtonVisible { get; }

Property Value

Boolean:

true if the container's options button is visible; otherwise, false. The default value is true.

IsRestoreButtonVisible

Gets whether the container's restore button is visible.

public bool IsRestoreButtonVisible { get; }

Property Value

Boolean:

true if the container's restore button is visible; otherwise, false. The default value is false.

IsToggleAutoHideButtonVisible

Gets whether the container's toggle auto-hide button is visible.

public bool IsToggleAutoHideButtonVisible { get; }

Property Value

Boolean:

true if the container's toggle auto-hide button is visible; otherwise, false. The default value is true.

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

ICommand:

The ICommand that can maximize the window that hosts the container.

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

ICommand:

The ICommand that can minimize the window that hosts the container.

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

ICommand:

The ICommand that can restore the window that hosts the container.

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.

public double TitleBarMinHeight { get; set; }

Property Value

Double:

The title bar minimum height.

TitleFontFamily

Gets or sets the title's font family.

public FontFamily TitleFontFamily { get; set; }

Property Value

FontFamily:

The title's font family.

TitleFontSize

Gets or sets the title's font size.

public double TitleFontSize { get; set; }

Property Value

Double:

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

ICommand:

The ICommand that can toggle the container between an auto-hide and docked state.

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

Boolean:

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()

Options the options menu for the SelectedWindow.

public void OpenOptionsMenu()

OpenOptionsMenu(FrameworkElement)

Options 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(Boolean)

Updates the visual state.

protected override void UpdateVisualState(bool useTransitions)
Parameter Type Description
useTransitions Boolean

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.

Explicit Interface Implementations

IDockTarget.GetState(Nullable<Side>)

Returns the DockingWindowState that specifies the state of the docking location around the target.

DockingWindowState IDockTarget.GetState(Side? side)
Parameter Type Description
side Nullable<Side>

Returns

DockingWindowState:

The DockingWindowState that specifies the state of the docking location around the target.

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

Extension Methods