In This Article

StandardMdiHost Class

Represents a container that hosts docking windows in a standard, or windowed, MDI (multiple-document interface) mode.

[TemplatePart(Name = "PART_ItemsControl", Type = typeof(StandardMdiItemsControl))]
[TemplateVisualState(Name = "ScrollingEnabled", GroupName = "ScrollStates")]
[TemplateVisualState(Name = "ScrollingDisabled", GroupName = "ScrollStates")]
public class StandardMdiHost : MdiHostBase, IDockTarget
Inheritance:
object Visual UIElement FrameworkElement Control MdiHostBase object
Implements:
IDockTarget

Constructors

StandardMdiHost()

Initializes an instance of the class.

public StandardMdiHost()

Properties

AreMaximizedWindowFramesVisible

Indicates whether the frames should be displayed when the windows are maximized.

public bool AreMaximizedWindowFramesVisible { get; set; }

Property Value

bool:

The default value is true.

AreWindowsMaximized

Indicates whether windows in the host are currently maximized.

public bool AreWindowsMaximized { get; set; }

Property Value

bool:

The default value is false.

CanWindowsMaximize

Indicates whether the windows in this host can be maximized.

public bool CanWindowsMaximize { get; set; }

Property Value

bool:

The default value is true.

Remarks

This setting only affects docking windows whose CanStandardMdiMaximize property is set to null. Any other setting on the docking window instance overrides this global setting.

CanWindowsMinimize

Indicates whether the windows in this host can be minimized.

public bool CanWindowsMinimize { get; set; }

Property Value

bool:

The default value is true.

Remarks

This setting only affects docking windows whose CanStandardMdiMinimize property is set to null. Any other setting on the docking window instance overrides this global setting.

ClosePrimaryWindowCommand

The ICommand that can close the PrimaryWindow.

public ICommand ClosePrimaryWindowCommand { get; }

Property Value

ICommand

IsAutoCascadeEnabled

Indicates whether the windows should be automatically cascaded on the initial load.

public bool IsAutoCascadeEnabled { get; set; }

Property Value

bool:

The default value is true.

IsExternalMaximizedUIRequired

Indicates whether external maximized window UI (generally minimize, restore, and close buttons) should be visible.

public bool IsExternalMaximizedUIRequired { get; }

Property Value

bool:

The default value is false.

Remarks

This property can be bound to the visibility of an external UI panel. It is only true when a document is maximized and AreMaximizedWindowFramesVisible is false.

IsScrollingEnabled

Indicates whether scrolling is supported by the standard MDI host.

public bool IsScrollingEnabled { get; set; }

Property Value

bool:

The default value is false.

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator LogicalChildren { get; }

Property Value

IEnumerator:

An enumerator for logical child elements of this element.

MaximizePrimaryWindowCommand

The ICommand that can maximize the PrimaryWindow.

public ICommand MaximizePrimaryWindowCommand { get; }

Property Value

ICommand

MinimizePrimaryWindowCommand

The ICommand that can minimize the PrimaryWindow.

public ICommand MinimizePrimaryWindowCommand { get; }

Property Value

ICommand

RestorePrimaryWindowCommand

The ICommand that can restore the PrimaryWindow.

public ICommand RestorePrimaryWindowCommand { get; }

Property Value

ICommand

Windows

The collection of child DockingWindow objects.

public ObservableCollection<DockingWindow> Windows { get; }

Property Value

ObservableCollection<DockingWindow>

Methods

ArrangeMinimizedWindows()

Re-arranges the minimized windows.

public void ArrangeMinimizedWindows()

Cascade()

Cascades the open documents.

public void Cascade()

ClosePrimaryWindow()

Closes the PrimaryWindow, if any.

public void ClosePrimaryWindow()

CreateNew()

Creates and returns a new instance of this class.

protected virtual StandardMdiHost CreateNew()

Returns

StandardMdiHost

GetDocuments()

Returns the list of docking windows within the MDI.

public override sealed IList<DockingWindow> GetDocuments()

Returns

IList<DockingWindow>

MaximizePrimaryWindow()

Maximizes the PrimaryWindow, if any.

public void MaximizePrimaryWindow()

MinimizePrimaryWindow()

Minimizes the PrimaryWindow, if any.

public void MinimizePrimaryWindow()

OnApplyTemplate()

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

public override void OnApplyTemplate()

OnCreateAutomationPeer()

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

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

OnPrimaryWindowChanged(DockingWindow?, DockingWindow?)

Occurs when the value of the PrimaryWindow property has changed.

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

The old value.

newValue DockingWindow

The new value.

RestorePrimaryWindow()

Restores the PrimaryWindow, if any.

public void RestorePrimaryWindow()

TileHorizontally()

Tiles the open documents horizontally.

public void TileHorizontally()

TileVertically()

Tiles the open documents vertically.

public void TileVertically()

Fields

AreMaximizedWindowFramesVisibleProperty

Defines the AreMaximizedWindowFramesVisible property.

public static readonly DependencyProperty AreMaximizedWindowFramesVisibleProperty

AreWindowsMaximizedProperty

Defines the AreWindowsMaximized property.

public static readonly DependencyProperty AreWindowsMaximizedProperty

CanWindowsMaximizeProperty

Defines the CanWindowsMaximize property.

public static readonly DependencyProperty CanWindowsMaximizeProperty

CanWindowsMinimizeProperty

Defines the CanWindowsMinimize property.

public static readonly DependencyProperty CanWindowsMinimizeProperty

IsAutoCascadeEnabledProperty

Defines the IsAutoCascadeEnabled property.

public static readonly DependencyProperty IsAutoCascadeEnabledProperty

IsExternalMaximizedUIRequiredProperty

Defines the IsExternalMaximizedUIRequired property.

public static readonly DependencyProperty IsExternalMaximizedUIRequiredProperty

IsScrollingEnabledProperty

Defines the IsScrollingEnabled property.

public static readonly DependencyProperty IsScrollingEnabledProperty

Inherited Members

Extension Methods