Table of Contents

Class ContentPresenter

Namespace
Stride.UI.Controls
Assembly
Stride.UI.dll

A class aiming at presenting another UIElement.

[DataContract("ContentPresenter")]
[Obsolete("This class has no effect and shouldn't be used. Consider one of the classes that inherit from ContentControl.")]
public class ContentPresenter : UIElement, IUIElementUpdate, IUIElementChildren, IIdentifiable
Inheritance
ContentPresenter
Implements
Inherited Members
Extension Methods

Constructors

ContentPresenter()

public ContentPresenter()

Properties

Content

Gets or sets the content of the presenter.

[DataMember]
public UIElement Content { get; set; }

Property Value

UIElement

Methods

ArrangeOverride(Vector3)

When overridden in a derived class, positions possible child elements and determines a size for a UIElement derived class.

protected override Vector3 ArrangeOverride(Vector3 finalSizeWithoutMargins)

Parameters

finalSizeWithoutMargins Vector3

The final area within the parent that this element should use to arrange itself and its children.

Returns

Vector3

The actual size used.

EnumerateChildren()

Enumerates the children of this element.

protected override IEnumerable<IUIElementChildren> EnumerateChildren()

Returns

IEnumerable<IUIElementChildren>

A sequence containing all the children of this element.

Remarks

This method is used by the implementation of the IUIElementChildren interface.

MeasureOverride(Vector3)

When overridden in a derived class, measures the size in layout required for possible child elements and determines a size for the UIElement-derived class.

protected override Vector3 MeasureOverride(Vector3 availableSizeWithoutMargins)

Parameters

availableSizeWithoutMargins Vector3

The available size that this element can give to child elements. Infinity can be specified as a value to indicate that the element will size to whatever content is available.

Returns

Vector3

The size desired by the children

UpdateWorldMatrix(ref Matrix, bool)

Method called by UpdateWorldMatrix(ref Matrix, bool). Parents are in charge of recursively calling this function on their children.

protected override void UpdateWorldMatrix(ref Matrix parentWorldMatrix, bool parentWorldChanged)

Parameters

parentWorldMatrix Matrix

The world matrix of the parent.

parentWorldChanged bool

Boolean indicating if the world matrix provided by the parent changed