AnimatedExpander Class
Represents an expander with an optional animated expansion.
public class AnimatedExpander : Expander
- Inheritance:
- object Visual UIElement FrameworkElement Control ContentControl HeaderedContentControl Expander object
Remarks
For detailed documentation on this control's features and how to use them, please see the AnimatedExpander documentation topic.
Constructors
AnimatedExpander()
Initializes an instance of the class.
public AnimatedExpander()
Properties
CanMeasureCollapsedContent
Gets or sets whether the expander will use the width measurement of collapsed content when calculating its own width. This is a dependency property.
public bool CanMeasureCollapsedContent { get; set; }
Property Value
- bool:
true
if the expander will use the width measurement of collapsed content when calculating its own width; otherwise,false
. The default value istrue
.
Remarks
When true
, a consistent width will be maintained when collapsed.
When false
, the expander will load faster (if collapsed) since less measuring is taking place.
CollapseDuration
Gets or sets the Duration of the collapse animation. This is a dependency property.
public Duration CollapseDuration { get; set; }
Property Value
ExpandDuration
Gets or sets the Duration of the expand animation. This is a dependency property.
public Duration ExpandDuration { get; set; }
Property Value
HeaderContextMenu
Gets or sets the ContextMenu used for the header. This is a dependency property.
public ContextMenu HeaderContextMenu { get; set; }
Property Value
- ContextMenu:
The ContextMenu used for the header. The default value is
null
.
HeaderCornerRadius
Gets or sets the corner radius used by the header. This is a dependency property.
public CornerRadius HeaderCornerRadius { get; set; }
Property Value
- CornerRadius:
The corner radius used by the header. The default value is
0,0,0,0
.
HeaderPadding
Gets or sets the Thickness of the padding around header content. This is a dependency property.
public Thickness HeaderPadding { get; set; }
Property Value
IsAutoCollapseOnBlurEnabled
Gets or sets whether the expander will auto-collapse when focus leaves it. This is a dependency property.
public bool IsAutoCollapseOnBlurEnabled { get; set; }
Property Value
- bool:
true
if the expander will auto-collapse when focus leaves it; otherwise,false
. The default value isfalse
.
IsAutoExpandOnFocusEnabled
Gets or sets whether the expander will auto-expand when focus enters it. This is a dependency property.
public bool IsAutoExpandOnFocusEnabled { get; set; }
Property Value
- bool:
true
if the expander will auto-expand when focus enters it; otherwise,false
. The default value isfalse
.
IsAutoFocusOnExpandEnabled
Gets or sets whether focus will attempt to be set in the content of the expander following the completion of the expansion animation. This is a dependency property.
public bool IsAutoFocusOnExpandEnabled { get; set; }
Property Value
- bool:
true
if focus will be set; otherwise,false
. The default value isfalse
.
Methods
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
Reports that the IsKeyboardFocusWithin
property changed.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameter | Type | Description |
---|---|---|
e | DependencyPropertyChangedEventArgs | A |
Fields
CanMeasureCollapsedContentProperty
Identifies the CanMeasureCollapsedContent dependency property. This field is read-only.
public static readonly DependencyProperty CanMeasureCollapsedContentProperty
CollapseDurationProperty
Identifies the CollapseDuration dependency property. This field is read-only.
public static readonly DependencyProperty CollapseDurationProperty
ExpandDurationProperty
Identifies the ExpandDuration dependency property. This field is read-only.
public static readonly DependencyProperty ExpandDurationProperty
HeaderContextMenuProperty
Identifies the HeaderContextMenu dependency property. This field is read-only.
public static readonly DependencyProperty HeaderContextMenuProperty
HeaderCornerRadiusProperty
Identifies the HeaderCornerRadius dependency property. This field is read-only.
public static readonly DependencyProperty HeaderCornerRadiusProperty
HeaderPaddingProperty
Identifies the HeaderPadding dependency property. This field is read-only.
public static readonly DependencyProperty HeaderPaddingProperty
IsAutoCollapseOnBlurEnabledProperty
Identifies the IsAutoCollapseOnBlurEnabled dependency property. This field is read-only.
public static readonly DependencyProperty IsAutoCollapseOnBlurEnabledProperty
IsAutoExpandOnFocusEnabledProperty
Identifies the IsAutoExpandOnFocusEnabled dependency property. This field is read-only.
public static readonly DependencyProperty IsAutoExpandOnFocusEnabledProperty
IsAutoFocusOnExpandEnabledProperty
Identifies the IsAutoFocusOnExpandEnabled dependency property. This field is read-only.
public static readonly DependencyProperty IsAutoFocusOnExpandEnabledProperty