TabbedMdiHost Class
Represents a container that hosts docking windows in a tabbed MDI (multiple-document interface) mode.
public class TabbedMdiHost : MdiHostBase, IDockTarget
- Inheritance:
- object Visual UIElement FrameworkElement Control MdiHostBase object
- Implements:
- IDockTarget
Constructors
TabbedMdiHost()
Initializes an instance of the TabbedMdiHost
class.
public TabbedMdiHost()
Properties
CanDocumentTabsDrag
Gets or sets the global setting for whether document tabs may be dragged to another location.
public bool CanDocumentTabsDrag { get; set; }
Property Value
- bool:
true
if document tabs may be dragged to another location; otherwise,false
. The default value istrue
.
Remarks
This setting only affects documents whose CanDragTab property is set to null
.
Any other setting on the document instance overrides this global setting.
CanDocumentsAttach
Gets or sets the global setting for whether documents may be attached to another document, creating a tabbed grouping.
public bool CanDocumentsAttach { get; set; }
Property Value
- bool:
true
if documents may be attached to another document; otherwise,false
. The default value istrue
.
Remarks
This setting only affects documents whose CanAttach property is set to null
.
Any other setting on the document instance overrides this global setting.
CanDocumentsCloseOnMiddleClick
Gets or sets a value indicating whether documents can be closed by clicking the tab with the middle mouse button.
public bool CanDocumentsCloseOnMiddleClick { get; set; }
Property Value
- bool:
true
if documents can be closed by clicking the tab with the middle mouse button; otherwise,false
. The default value istrue
.
CanDocumentsDock
Gets or sets the global setting for whether documents can be docked to a new container.
public bool CanDocumentsDock { get; set; }
Property Value
- bool:
true
if documents can be docked to a new container; otherwise,false
. The default value istrue
.
Remarks
This setting only affects documents whose CanDock property is set to null
.
Any other setting on the document instance overrides this global setting.
Child
Gets the FrameworkElement child of the host, which can be a SplitContainer or TabbedMdiContainer.
public FrameworkElement Child { get; set; }
Property Value
- FrameworkElement:
The FrameworkElement child of the host. The default value is
null
.
ContainersHaveNewTabButtons
Gets or sets whether containers have new tab buttons.
public bool ContainersHaveNewTabButtons { get; set; }
Property Value
- bool:
true
if containers have new tab buttons; otherwise,false
. The default value isfalse
.
EmptyContent
Gets or sets the content to display when there are no documents visible in the host.
public object EmptyContent { get; set; }
Property Value
- object:
The content to display when there are no documents visible in the host.
EmptyContentTemplate
Gets or sets the DataTemplate to display when there are no documents visible in the host.
public DataTemplate EmptyContentTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to display when there are no documents visible in the host.
HasTabCloseButtons
Gets or sets whether close buttons should appear on document tabs.
public bool HasTabCloseButtons { get; set; }
Property Value
- bool:
true
if close buttons should appear on document tabs; otherwise,false
. The default value istrue
.
HasTabImages
Gets or sets whether document tabs display an embedded image when one is available.
public bool HasTabImages { get; set; }
Property Value
- bool:
true
if document tabs display an embedded image when one is available; otherwise,false
. The default value isfalse
.
HasTabPinButtons
Gets or sets whether pin buttons should appear on document tabs (normal layout kind).
public bool HasTabPinButtons { get; set; }
Property Value
- bool:
true
if pin buttons should appear on document tabs (normal layout kind); otherwise,false
. The default value isfalse
.
HasTabPromoteButtons
Gets or sets whether promote buttons should appear on document tabs (preview layout kind).
public bool HasTabPromoteButtons { get; set; }
Property Value
- bool:
true
if promote buttons should appear on document tabs (preview layout kind); otherwise,false
. The default value istrue
.
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.
MaxTabExtent
Gets or sets the maximum extent of a tab.
public double MaxTabExtent { get; set; }
Property Value
- double:
The maximum extent of a tab. The default value is
430.0
.
Remarks
Set the MinTabExtent to the same as the MaxTabExtent to produce fixed-size tabs.
The Style
set by default in TabItemContainerStyle has a HeaderTemplate
that contains a TextBlock
whose Text
property is bound to the TabTextResolved property.
Note that the TextBlock
via its TextTrimming
property will apply character ellipses to the end of any tab text that exceeds the
TextBlock
width allowed by MaxTabExtent.
File name display scenarios generally wish to place ellipses in the middle of the trimmed text instead of at the end,
however this UI platform doesn't support text trimming features in the middle of text.
To support this feature, we have a TitleConverter value converter in place in the TextBlock.Text
property binding that
receives a text string and will replace the middle part of the string with ellipses if the string is too long character-wise.
Ensure that the MaxTabExtent is wide enough to handle the maximum string size returned by the title value converter,
or else a scenario could occur where the value converter places ellipses in the middle of the text
and the system via TextBlock.TextTrimming
places ellipses at the end of the text as well.
Note that increasing the MaxTabExtent property will not allow more tab text characters to show unless you also update the properties of the title value converter to allow a longer text result.
MinTabExtent
Gets or sets the minimum extent of a tab.
public double MinTabExtent { get; set; }
Property Value
- double:
The minimum extent of a tab. The default value is
30.0
.
Remarks
Set the MinTabExtent to the same as the MaxTabExtent to produce fixed-size tabs. This property will be ignored when a TabOverflowBehavior that involves shrinking is active and the tabs enter an overflow scenario.
TabControlStyle
Gets or sets the Style to use for the contained tab controls in a TabbedMdiContainer.
public Style TabControlStyle { get; set; }
Property Value
- Style:
The Style to use for the contained tab controls in a TabbedMdiContainer.
TabItemContainerStyle
Gets or sets the Style to use for rendering the tab item containers in a TabbedMdiContainer.
public Style TabItemContainerStyle { get; set; }
Property Value
- Style:
The Style to use for rendering the tab item containers in a TabbedMdiContainer.
TabOverflowBehavior
Gets or sets the overflow behavior of the document tabs.
public TabOverflowBehavior TabOverflowBehavior { get; set; }
Property Value
- TabOverflowBehavior:
The overflow behavior of the document tabs. The default value is
Menu
.
TabStripPlacement
Gets or sets a Side indicating the side upon which the tabs are located.
public Side TabStripPlacement { get; set; }
Property Value
Methods
Cascade()
Cascades the open documents.
public void Cascade()
CreateNew()
Creates a new instance of this class.
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.
OnDockHostChanged(DockHost, DockHost)
Occurs when the value of the DockHost property has changed.
protected override void OnDockHostChanged(DockHost oldValue, DockHost newValue)
Parameter | Type | Description |
---|---|---|
oldValue | DockHost | The old value. |
newValue | DockHost | The new value. |
TileHorizontally()
Tiles the open documents horizontally.
public void TileHorizontally()
TileHorizontally(int)
Tiles the open documents horizontally.
public void TileHorizontally(int maxColumnCount)
Parameter | Type | Description |
---|---|---|
maxColumnCount | int | The maximum column count |
TileVertically()
Tiles the open documents vertically.
public void TileVertically()
TileVertically(int)
Tiles the open documents horizontally.
public void TileVertically(int maxRowCount)
Parameter | Type | Description |
---|---|---|
maxRowCount | int | The maximum row count |
Fields
CanDocumentTabsDragProperty
Identifies the CanDocumentTabsDrag dependency property. This field is read-only.
public static readonly DependencyProperty CanDocumentTabsDragProperty
CanDocumentsAttachProperty
Identifies the CanDocumentsAttach dependency property. This field is read-only.
public static readonly DependencyProperty CanDocumentsAttachProperty
CanDocumentsCloseOnMiddleClickProperty
Identifies the CanDocumentsCloseOnMiddleClick dependency property. This field is read-only.
public static readonly DependencyProperty CanDocumentsCloseOnMiddleClickProperty
CanDocumentsDockProperty
Identifies the CanDocumentsDock dependency property. This field is read-only.
public static readonly DependencyProperty CanDocumentsDockProperty
ChildProperty
Identifies the Child dependency property. This field is read-only.
public static readonly DependencyProperty ChildProperty
ContainersHaveNewTabButtonsProperty
Identifies the ContainersHaveNewTabButtons dependency property. This field is read-only.
public static readonly DependencyProperty ContainersHaveNewTabButtonsProperty
EmptyContentProperty
Identifies the EmptyContent dependency property. This field is read-only.
public static readonly DependencyProperty EmptyContentProperty
EmptyContentTemplateProperty
Identifies the EmptyContentTemplate dependency property. This field is read-only.
public static readonly DependencyProperty EmptyContentTemplateProperty
HasTabCloseButtonsProperty
Identifies the HasTabCloseButtons dependency property. This field is read-only.
public static readonly DependencyProperty HasTabCloseButtonsProperty
HasTabImagesProperty
Identifies the HasTabImages dependency property. This field is read-only.
public static readonly DependencyProperty HasTabImagesProperty
HasTabPinButtonsProperty
Identifies the HasTabPinButtons dependency property. This field is read-only.
public static readonly DependencyProperty HasTabPinButtonsProperty
HasTabPromoteButtonsProperty
Identifies the HasTabPromoteButtons dependency property. This field is read-only.
public static readonly DependencyProperty HasTabPromoteButtonsProperty
MaxTabExtentProperty
Identifies the MaxTabExtent dependency property. This field is read-only.
public static readonly DependencyProperty MaxTabExtentProperty
MinTabExtentProperty
Identifies the MinTabExtent dependency property. This field is read-only.
public static readonly DependencyProperty MinTabExtentProperty
TabControlStyleProperty
Identifies the TabControlStyle dependency property. This field is read-only.
public static readonly DependencyProperty TabControlStyleProperty
TabItemContainerStyleProperty
Identifies the TabItemContainerStyle dependency property. This field is read-only.
public static readonly DependencyProperty TabItemContainerStyleProperty
TabOverflowBehaviorProperty
Identifies the TabOverflowBehavior dependency property. This field is read-only.
public static readonly DependencyProperty TabOverflowBehaviorProperty
TabStripPlacementProperty
Identifies the TabStripPlacement dependency property. This field is read-only.
public static readonly DependencyProperty TabStripPlacementProperty
Inherited Members
- MdiHostBase.IsEmptyProperty
- MdiHostBase.PrimaryWindowProperty
- MdiHostBase.PrimaryWindowChangedEvent
- MdiHostBase.OnApplyTemplate()
- MdiHostBase.OnPrimaryWindowChanged(DockingWindow, DockingWindow)
- MdiHostBase.DockHost
- MdiHostBase.DockSite
- MdiHostBase.IsEmpty
- MdiHostBase.PrimaryWindow
- MdiHostBase.PrimaryWindowChanged