AnimatedExpander Class
Represents an expander with an optional animated expansion.
public class AnimatedExpander : Expander
- Inheritance:
- object Visual UIElement FrameworkElement Control ContentControl HeaderedContentControl Expander object
Constructors
AnimatedExpander()
Initializes an instance of the class.
public AnimatedExpander()
Properties
CanMeasureCollapsedContent
Indicates whether the expander will use the width measurement of collapsed content when calculating its own width.
public bool CanMeasureCollapsedContent { get; set; }
Property Value
- bool:
trueif 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
The Duration of the collapse animation.
public Duration CollapseDuration { get; set; }
Property Value
- Duration:
The default value is
250milliseconds.
ExpandDuration
The Duration of the expand animation.
public Duration ExpandDuration { get; set; }
Property Value
- Duration:
The default value is
250milliseconds.
HeaderContextMenu
The ContextMenu used for the header.
public ContextMenu? HeaderContextMenu { get; set; }
Property Value
- ContextMenu:
The default value is
null.
HeaderCornerRadius
The corner radius used by the header.
public CornerRadius HeaderCornerRadius { get; set; }
Property Value
- CornerRadius:
The default value is
0,0,0,0.
HeaderPadding
The Thickness of the padding around header content.
IsAutoCollapseOnBlurEnabled
Indicates whether the expander will auto-collapse when focus leaves it.
public bool IsAutoCollapseOnBlurEnabled { get; set; }
Property Value
- bool:
trueif the expander will auto-collapse when focus leaves it; otherwise,false. The default value isfalse.
IsAutoExpandOnFocusEnabled
Indicates whether the expander will auto-expand when focus enters it.
public bool IsAutoExpandOnFocusEnabled { get; set; }
Property Value
- bool:
trueif the expander will auto-expand when focus enters it; otherwise,false. The default value isfalse.
IsAutoFocusOnExpandEnabled
Indicates whether focus will attempt to be set in the content of the expander following the completion of the expansion animation.
public bool IsAutoFocusOnExpandEnabled { get; set; }
Property Value
- bool:
trueif focus will be set; otherwise,false. The default value isfalse.
Methods
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
Invoked just before the IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DependencyPropertyChangedEventArgs | A System.Windows.DependencyPropertyChangedEventArgs that contains the event data. |
Fields
CanMeasureCollapsedContentProperty
Defines the CanMeasureCollapsedContent property.
public static readonly DependencyProperty CanMeasureCollapsedContentProperty
CollapseDurationProperty
Defines the CollapseDuration property.
public static readonly DependencyProperty CollapseDurationProperty
ExpandDurationProperty
Defines the ExpandDuration property.
public static readonly DependencyProperty ExpandDurationProperty
HeaderContextMenuProperty
Defines the HeaderContextMenu property.
public static readonly DependencyProperty HeaderContextMenuProperty
HeaderCornerRadiusProperty
Defines the HeaderCornerRadius property.
public static readonly DependencyProperty HeaderCornerRadiusProperty
HeaderPaddingProperty
Defines the HeaderPadding property.
public static readonly DependencyProperty HeaderPaddingProperty
IsAutoCollapseOnBlurEnabledProperty
Defines the IsAutoCollapseOnBlurEnabled property.
public static readonly DependencyProperty IsAutoCollapseOnBlurEnabledProperty
IsAutoExpandOnFocusEnabledProperty
Defines the IsAutoExpandOnFocusEnabled property.
public static readonly DependencyProperty IsAutoExpandOnFocusEnabledProperty
IsAutoFocusOnExpandEnabledProperty
Defines the IsAutoFocusOnExpandEnabled property.
public static readonly DependencyProperty IsAutoFocusOnExpandEnabledProperty