Class ContentControl
Represents a control with a single piece of content of any type.
[DataContract("ContentControl")]
public abstract class ContentControl : Control, IUIElementUpdate, IUIElementChildren, IIdentifiable
- Inheritance
-
ContentControl
- Implements
- Derived
- Inherited Members
- Extension Methods
Fields
ContentArrangeMatrixPropertyKey
The key to the ContentArrangeMatrix dependency property.
protected static readonly PropertyKey<Matrix> ContentArrangeMatrixPropertyKey
Field Value
Properties
Content
Gets or sets the content of the ContentControl.
[DataMember]
public virtual UIElement Content { get; set; }
Property Value
Exceptions
- InvalidOperationException
The value passed has already a parent.
VisualContent
Gets the visual content of the ContentControl.
public UIElement VisualContent { get; protected set; }
Property Value
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
Vector3The 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
Vector3The 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)