In This Article

TabbedMdiContainer Class

Represents a container of one or more documents in tabbed MDI.

public class TabbedMdiContainer : DockingWindowContainerBase, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue, IDockTarget, IOrientedElement
Inheritance:
object AvaloniaObject Animatable StyledElement Visual Layoutable Interactive InputElement Control TemplatedControl DockingWindowContainerBase object
Implements:
IDataContextProvider ILogical IThemeVariantHost IResourceHost IResourceNode IStyleHost ISetLogicalParent ISetInheritanceParent IStyleable INamed IInputElement IDataTemplateHost ISetterValue IDockTarget IOrientedElement

Constructors

TabbedMdiContainer()

Initializes an instance of the class.

public TabbedMdiContainer()

Properties

HasNewTabButton

Indicates whether a new tab button is available.

public bool HasNewTabButton { get; set; }

Property Value

bool:

The default value is false.

HasTabCloseButtons

Indicates whether close buttons should appear on document tabs.

public bool HasTabCloseButtons { get; set; }

Property Value

bool:

The default value is true.

HasTabPinButtons

Indicates whether pin buttons should appear on document tabs (normal layout kind).

public bool HasTabPinButtons { get; set; }

Property Value

bool:

The default value is false.

HasTabPromoteButtons

Indicates whether promote buttons should appear on document tabs (preview layout kind).

public bool HasTabPromoteButtons { get; set; }

Property Value

bool:

The default value is true.

OpenContextMenuKeyGesture

The Avalonia.Input.KeyGesture that is used to invoke the OpenContextMenu() method by default.

public KeyGesture? OpenContextMenuKeyGesture { get; set; }

Property Value

KeyGesture:

The default value is Alt+-.

OpenTabMenuKeyGesture

The Avalonia.Input.KeyGesture that is used to invoke the OpenTabMenu() method by default.

public KeyGesture? OpenTabMenuKeyGesture { get; set; }

Property Value

KeyGesture:

The default value is Ctrl+Alt+Down.

Windows

The collection of child DockingWindow objects.

[Content]
public ObservableCollection<DockingWindow> Windows { get; }

Property Value

ObservableCollection<DockingWindow>

Methods

OnCreateAutomationPeer()

Returns a new, type-specific Avalonia.Automation.Peers.AutomationPeer implementation for the control.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific Avalonia.Automation.Peers.AutomationPeer implementation.

OnDockSiteChanged(DockSite?, DockSite?)

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

Called before the Avalonia.Input.InputElement.KeyDown event occurs.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e KeyEventArgs

The event args.

OnSelectedWindowChanged(DockingWindow?, DockingWindow?)

Called when the SelectedWindow property is changed.

protected override void OnSelectedWindowChanged(DockingWindow? oldSelectedWindow, DockingWindow? newSelectedWindow)
Parameter Type Description
oldSelectedWindow DockingWindow

The old selected window.

newSelectedWindow DockingWindow

The new selected window.

OnTabControlMenuOpening(AdvancedTabControlMenuEventArgs)

Called 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.

OnWindowsChanged(NotifyCollectionChangedEventArgs)

Called when the windows collection is changed.

protected override void OnWindowsChanged(NotifyCollectionChangedEventArgs e)
Parameter Type Description
e NotifyCollectionChangedEventArgs

A NotifyCollectionChangedEventArgs that contains the event data.

OpenContextMenu()

Opens the context menu for the SelectedWindow.

public void OpenContextMenu()

OpenTabMenu()

Opens the tab menu if the menu button is visible.

public void OpenTabMenu()

UpdateDockingWindowStates()

Updates the DockingWindowState associated with all child docking windows.

protected override void UpdateDockingWindowStates()

UpdateIsTabStripVisible()

Updates the IsTabStripVisible property.

protected override void UpdateIsTabStripVisible()

Fields

HasNewTabButtonProperty

Defines the HasNewTabButton property.

public static readonly StyledProperty<bool> HasNewTabButtonProperty

HasTabCloseButtonsProperty

Defines the HasTabCloseButtons property.

public static readonly StyledProperty<bool> HasTabCloseButtonsProperty

HasTabPinButtonsProperty

Defines the HasTabPinButtons property.

public static readonly StyledProperty<bool> HasTabPinButtonsProperty

HasTabPromoteButtonsProperty

Defines the HasTabPromoteButtons property.

public static readonly StyledProperty<bool> HasTabPromoteButtonsProperty

OpenContextMenuKeyGestureProperty

Defines the OpenContextMenuKeyGesture property.

public static readonly StyledProperty<KeyGesture?> OpenContextMenuKeyGestureProperty

OpenTabMenuKeyGestureProperty

Defines the OpenTabMenuKeyGesture property.

public static readonly StyledProperty<KeyGesture?> OpenTabMenuKeyGestureProperty

Inherited Members

Extension Methods