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
Implements
Namespace: Syncfusion.Windows.Controls.Layout
Assembly: Syncfusion.SfAccordion.WPF.dll
Syntax
public class ExpandableContentControl : ContentControl, IDisposable
Constructors
ExpandableContentControl()
Initializes a new instance of the ExpandableContentControl class.
Declaration
public ExpandableContentControl()
Fields
PercentageProperty
Identifies the Percentage dependency property.
Declaration
public static readonly DependencyProperty PercentageProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
TargetSizeProperty
Identifies the TargetSize dependency property.
Declaration
public static readonly DependencyProperty TargetSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
Percentage
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 |
---|
System.Double |
TargetSize
Gets or sets the desired size of the ExpandableContentControl content.
Declaration
public Size TargetSize { get; set; }
Property Value
Type |
---|
System.Windows.Size |
Remarks
Use the percentage property to animate to this size.
Methods
ArrangeOverride(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 |
---|---|---|
System.Windows.Size | finalSize | The final area within the parent that this object should use to arrange itself and its children. |
Returns
Type | Description |
---|---|
System.Windows.Size | The actual size used. |
Dispose()
Represents dispose method for disposing unwanted objects
Declaration
public void Dispose()
Dispose(Boolean)
To remove all the instance which is used in ExpandableContentControl
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
MeasureOverride(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 |
---|---|---|
System.Windows.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 |
---|---|
System.Windows.Size | The size that this object determines it needs during layout, based on its calculations of child object allotted sizes. |
OnApplyTemplate()
Builds the visual tree for the ExpandableContentControl control when a new template is applied.
Declaration
public override void OnApplyTemplate()
Events
ContentSizeChanged
Occurs when the content changed its size.
Declaration
public event SizeChangedEventHandler ContentSizeChanged
Event Type
Type |
---|
System.Windows.SizeChangedEventHandler |