In This Article

StandardMdiWindowControl Class

Represents a HostWindowControlBase that is used as the root control of a standard MDI window.

public class StandardMdiWindowControl : HostWindowControlBase, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance:
object AvaloniaObject Animatable StyledElement Visual Layoutable Interactive InputElement Control TemplatedControl ContentControl WindowControl HostWindowControlBase object
Implements:
IDataContextProvider ILogical IThemeVariantHost IResourceHost IResourceNode IStyleHost ISetLogicalParent ISetInheritanceParent IStyleable INamed IInputElement IDataTemplateHost ISetterValue

Constructors

StandardMdiWindowControl()

Initializes an instance of the class.

public StandardMdiWindowControl()

Properties

AreWindowStateBoundsChangedWithExternalLogic

Indicates whether window state change logic that triggers bounds changes are handled externally.

protected override bool AreWindowStateBoundsChangedWithExternalLogic { get; }

Property Value

bool

ContextContent

The context content that is displayed on the title bar next to the title.

public object? ContextContent { get; set; }

Property Value

object:

The default value is null.

ContextContentTemplate

The Avalonia.Controls.Templates.IDataTemplate to use for the ContextContent.

public IDataTemplate? ContextContentTemplate { get; set; }

Property Value

IDataTemplate:

The default value is null.

DockHost

The DockHost that contains this control.

public DockHost? DockHost { get; }

Property Value

DockHost

DockSite

The DockSite that is managing this docking window.

public DockSite? DockSite { get; }

Property Value

DockSite

DockingWindow

The DockingWindow that is wrapped by this control.

public DockingWindow? DockingWindow { get; }

Property Value

DockingWindow

IsReadOnly

Indicates whether the window's contents are read-only.

public bool IsReadOnly { get; set; }

Property Value

bool:

This is a visual indicator only. The default value is false.

ReadOnlyContextContentTemplate

The Avalonia.Controls.Templates.IDataTemplate to be displayed when the IsReadOnly property is true.

public IDataTemplate? ReadOnlyContextContentTemplate { get; set; }

Property Value

IDataTemplate

Methods

GetAdjustedBounds(Rect, ResizeOperation)

Returns an adjusted version of the specified bounds, which can provide support for features such as magnetism.

public override Rect GetAdjustedBounds(Rect bounds, ResizeOperation resizeOperation)
Parameter Type Description
bounds Rect

The bounds to examine.

resizeOperation ResizeOperation

The active resize operation.

Returns

Rect

OnActivated(RoutedEventArgs)

Called when the window gains focus within.

protected override void OnActivated(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

OnClosed(RoutedEventArgs)

Called when the window is about to close.

protected override void OnClosed(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

OnLocationChanged(RoutedEventArgs)

Called when the window is moved.

protected override void OnLocationChanged(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

OnStateChanged(RoutedEventArgs)

Called after the window's WindowState property has changed.

protected override void OnStateChanged(RoutedEventArgs e)
Parameter Type Description
e RoutedEventArgs

A RoutedEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

OnTitleBarMenuOpening(DockingMenuEventArgs)

Called when the titlebar should display a context menu.

protected override void OnTitleBarMenuOpening(DockingMenuEventArgs e)
Parameter Type Description
e DockingMenuEventArgs

A DockingMenuEventArgs that contains the event data.

Remarks

This method has no default implementation. Because an intermediate class in the inheritance might implement this method, we recommend that you call the base implementation in your implementation.

Fields

ContextContentProperty

Defines the ContextContent property.

public static readonly StyledProperty<object?> ContextContentProperty

ContextContentTemplateProperty

Defines the ContextContentTemplate property.

public static readonly StyledProperty<IDataTemplate?> ContextContentTemplateProperty

IsReadOnlyProperty

Defines the IsReadOnly property.

public static readonly StyledProperty<bool> IsReadOnlyProperty

ReadOnlyContextContentTemplateProperty

Defines the ReadOnlyContextContentTemplate property.

public static readonly StyledProperty<IDataTemplate?> ReadOnlyContextContentTemplateProperty

Inherited Members

Extension Methods