You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proposal: Add the Ability to Cancel Expand/Collapse of the Expander
Summary
In some cases it is necessary to programmatically override user selection and cancel either expanding or collapsing the Expander control (specific case described below).
In order to support this, the following Events/Properties should be added:
/// <summary>/// Gets or sets a value indicating whether the expander is pinned to its current state (either expanded or collapsed)./// The toggle button to change state will be disabled./// </<summary>boolIsPinned;/// <summary>/// Event fired before the control is expanded./// This allows cancelling the expand operation./// </summary>eventTypedEventHandler<Expander,ExpanderExpandingEventArgs>Expanding;/// <summary>/// Event fired before the control is collapsed./// This allows cancelling the collapse operation./// </summary>eventTypedEventHandler<Expander,ExpanderCollapsingEventArgs>Collapsing;
This functionality is needed, for example, in the following use-case:
When there are many properties in an editor it is common to group them and put them in an accordion-style layout with Expanders stacked on top of one another. In my case, to save space, only one Expander should be opened at a time in the accordion. However, at least one expander should always be opened to show something to the user.
The closing event with cancelation is necessary to ensure the currently expanded expander in the accordion is never closed. It is only closed when another expander is expanded.
Proposal: Add the Ability to Cancel Expand/Collapse of the Expander
Summary
In some cases it is necessary to programmatically override user selection and cancel either expanding or collapsing the Expander control (specific case described below).
In order to support this, the following Events/Properties should be added:
Cancellation and the Expanding/Collapsing events should follow what is done in Flyout and FlyoutBaseClosingEventArgs.
Rationale
This functionality is needed, for example, in the following use-case:
Further discussed: #4390 (comment) and #3279 (comment)
Scope
Important Notes
Also see:
The text was updated successfully, but these errors were encountered: