Represents the DXExpander control.
Related API Members
The following members accept/return DXExpander objects:
The DXExpander control enables you to make your user interface elements expandable. The DXExpander's content can be expanded or collapsed with a predefined or custom animation.
The DXExpander's expand state is specified via the DXExpander.IsExpanded property. When the DXExpander.IsExpanded property's value is changed, the DXExpander plays the collapse or expand animation. To obtain the current progress of animation play, use the DXExpander.AnimationProgress property. To obtain whether the DXExpander is currently expanding or collapsing, use the DXExpander.Expanding and DXExpander.Collapsing properties, respectively.
The DXExpander can play two types of animation: horizontal and vertical, and provides three animation styles for each type. The horizontal animation styles are used to display content collapsing or expanding from left to right, from right to left, or from center to edges. The vertical animation styles represent top-to-bottom, bottom-to-top and center-to-edges animation. Animation styles are specified by the DXExpander.HorizontalExpand and DXExpander.VerticalExpand properties. You can also specify the animation speed via the DXExpander.Duration property.
The DXExpander's content can be either stretched or slid when expanding or collapsing. The animation effect used to show the content is specified by the DXExpander.StretchChild property.
To implement a custom collapse or expand animation, create a Storyboard object representing the animation storyboard, and assign it to the DXExpander.CollapseStoryboard or DXExpander.ExpandStoryboard property, respectively.
The following example demonstrates how to make visual elements expandable via the DXExpander.In this example, the DXExpander with a GroupBox inside it is placed into a standard Grid. The DXExpander can be expanded (or collapsed) by clicking the ellipsis button. This shows or hides the GroupBox.
<Application x:Class="DXExpander_CreatingAndUsing.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" StartupUri="MainWindow.xaml"> <Application.Resources> </Application.Resources> </Application>