Class ContentPresenter
Displays the content of a ContentControl.
Inheritance
System.Object
ContentPresenter
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Controls
Assembly: OpenSilver.dll
Syntax
public class ContentPresenter : FrameworkElement
Constructors
| Improve this Doc View SourceContentPresenter()
Initializes a new instance of the ContentPresenter class.
Declaration
public ContentPresenter()
Fields
| Improve this Doc View SourceContentProperty
Identifies the Content dependency property
Declaration
public static readonly DependencyProperty ContentProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ContentTemplateProperty
Identifies the ContentTemplate dependency property.
Declaration
public static readonly DependencyProperty ContentTemplateProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceContent
Gets or sets the data that is used to generate the child elements of a ContentPresenter.
Declaration
public object Content { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The data that is used to generate the child elements. The default is null. |
ContentTemplate
Gets or sets the template that is used to display the content of the control.
Declaration
public DataTemplate ContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
DataTemplate | A DataTemplate that defines the visualization of the content. The default is null. |
Methods
| Improve this Doc View SourceArrangeOverride(Size)
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
Size | finalSize |
Returns
Type | Description |
---|---|
Size |
Overrides
| Improve this Doc View SourceMeasureOverride(Size)
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize |
Returns
Type | Description |
---|---|
Size |