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 StandardMdiHost class.

public StandardMdiHost()

Properties

AreMaximizedWindowFramesVisible

Gets or sets whether the frames should be displayed when the windows are maximized.

public bool AreMaximizedWindowFramesVisible { get; set; }

Property Value

bool:

true if the frames should be displayed when the windows are maximized; otherwise, false. The default value is true.

AreWindowsMaximized

Gets or sets whether windows in the host are currently maximized.

public bool AreWindowsMaximized { get; set; }

Property Value

bool:

true if windows in the host are currently maximized; otherwise, false. The default value is false.

CanWindowsMaximize

Gets or sets whether the windows in this host can be maximized.

public bool CanWindowsMaximize { get; set; }

Property Value

bool:

true if the windows in this host can be maximized; otherwise, false. 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

Gets or sets whether the windows in this host can be minimized.

public bool CanWindowsMinimize { get; set; }

Property Value

bool:

true if the windows in this host can be minimized; otherwise, false. 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

Gets the ICommand that can close the PrimaryWindow.

public ICommand ClosePrimaryWindowCommand { get; }

Property Value

ICommand:

The ICommand that can close the PrimaryWindow.

IsAutoCascadeEnabled

Gets or sets a value indicating whether the windows should be automatically cascaded on the initial load.

public bool IsAutoCascadeEnabled { get; set; }

Property Value

bool:

true if the windows should be automatically cascaded on the initial load; otherwise false. The default value is true.

IsExternalMaximizedUIRequired

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

public bool IsExternalMaximizedUIRequired { get; }

Property Value

bool:

true if external maximized window UI should be visible; otherwise false. 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

Gets or sets a value indicating whether scrolling is supported by the standard MDI host.

public bool IsScrollingEnabled { get; set; }

Property Value

bool:

true if scrolling is supported by the standard MDI host; otherwise false. 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

Gets the ICommand that can maximize the PrimaryWindow.

public ICommand MaximizePrimaryWindowCommand { get; }

Property Value

ICommand:

The ICommand that can maximize the PrimaryWindow.

MinimizePrimaryWindowCommand

Gets the ICommand that can minimize the PrimaryWindow.

public ICommand MinimizePrimaryWindowCommand { get; }

Property Value

ICommand:

The ICommand that can minimize the PrimaryWindow.

RestorePrimaryWindowCommand

Gets the ICommand that can restore the PrimaryWindow.

public ICommand RestorePrimaryWindowCommand { get; }

Property Value

ICommand:

The ICommand that can restore the PrimaryWindow.

Windows

Gets the collection of child DockingWindow objects.

public ObservableCollection<DockingWindow> Windows { get; }

Property Value

ObservableCollection<DockingWindow>:

The collection of child DockingWindow objects.

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

GetDocuments()

Returns the list of docking windows within the MDI.

public override sealed IList<DockingWindow> GetDocuments()

Returns

IList<DockingWindow>:

The list of docking windows within the MDI.

MaximizePrimaryWindow()

Maximizes the PrimaryWindow, if any.

public void MaximizePrimaryWindow()

MinimizePrimaryWindow()

Minimizes the PrimaryWindow, if any.

public void MinimizePrimaryWindow()

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.

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

Identifies the AreMaximizedWindowFramesVisible dependency property. This field is read-only.

public static readonly DependencyProperty AreMaximizedWindowFramesVisibleProperty

AreWindowsMaximizedProperty

Identifies the AreWindowsMaximized dependency property. This field is read-only.

public static readonly DependencyProperty AreWindowsMaximizedProperty

CanWindowsMaximizeProperty

Identifies the CanWindowsMaximize dependency property. This field is read-only.

public static readonly DependencyProperty CanWindowsMaximizeProperty

CanWindowsMinimizeProperty

Identifies the CanWindowsMinimize dependency property. This field is read-only.

public static readonly DependencyProperty CanWindowsMinimizeProperty

IsAutoCascadeEnabledProperty

Identifies the IsAutoCascadeEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsAutoCascadeEnabledProperty

IsExternalMaximizedUIRequiredProperty

Identifies the IsExternalMaximizedUIRequired dependency property. This field is read-only.

public static readonly DependencyProperty IsExternalMaximizedUIRequiredProperty

IsScrollingEnabledProperty

Identifies the IsScrollingEnabled dependency property. This field is read-only.

public static readonly DependencyProperty IsScrollingEnabledProperty

Inherited Members