Class ExpandableContentControl
Represents a control with a single piece of content that expands or collapses in a sliding motion to a specified desired size.
Inheritance
Inherited Members
Namespace: System.Windows.Controls.Primitives
Assembly: Controls.Layout.Toolkit.OpenSilver.dll
Syntax
public class ExpandableContentControl : ContentControl
Constructors
| Improve this Doc View SourceExpandableContentControl()
Initializes a new instance of the ExpandableContentControl class.
Declaration
public ExpandableContentControl()
Fields
| Improve this Doc View SourcePercentageProperty
Identifies the Percentage dependency property.
Declaration
public static readonly DependencyProperty PercentageProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
RevealModeProperty
Identifies the RevealMode dependency property.
Declaration
public static readonly DependencyProperty RevealModeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TargetSizeProperty
Identifies the TargetSize dependency property.
Declaration
public static readonly DependencyProperty TargetSizeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourcePercentage
Gets or sets the relative percentage of the content that is currently visible. A percentage of 1 corresponds to the complete TargetSize.
Declaration
public double Percentage { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
RevealMode
Gets or sets the direction in which the ExpandableContentControl content window opens.
Declaration
public ExpandDirection RevealMode { get; set; }
Property Value
Type | Description |
---|---|
ExpandDirection |
TargetSize
Gets or sets the desired size of the ExpandableContentControl content.
Declaration
public Size TargetSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
Remarks
Use the percentage property to animate to this size.
Methods
| Improve this Doc View SourceArrangeOverride(Size)
Arranges the control and its content. Content is arranged according to the TargetSize and clipped.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
Size | finalSize | The final area within the parent that this object should use to arrange itself and its children. |
Returns
Type | Description |
---|---|
Size | The actual size used. |
Overrides
| Improve this Doc View SourceMeasureOverride(Size)
Does a measure pass of the control and its content. The content will get measured according to the TargetSize and is clipped.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | The available size that this object can give to child objects. Infinity can be specified as a value to indicate that the object will size to whatever content is available. |
Returns
Type | Description |
---|---|
Size | The size that this object determines it needs during layout, based on its calculations of child object allotted sizes. |
Overrides
| Improve this Doc View SourceOnApplyTemplate()
Builds the visual tree for the ExpandableContentControl control when a new template is applied.
Declaration
public override void OnApplyTemplate()
Overrides
Events
| Improve this Doc View SourceContentSizeChanged
Occurs when the content changed its size.
Declaration
public event SizeChangedEventHandler ContentSizeChanged
Event Type
Type | Description |
---|---|
SizeChangedEventHandler |