Our What's New in v24.1 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.
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.
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.
ImportsSystem.WindowsImportsDevExpress.Xpf.CoreImportsSystem.Collections.ObjectModelNamespace DXExpander_CreatingAndUsing
PartialPublicClass MainWindow
Inherits Window
PublicSubNew()
InitializeComponent()
Me.DataContext = New MyViewModel()
ApplicationThemeHelper.ApplicationThemeName = "Office2016White"EndSubPrivateSub Button_Click(ByVal sender AsObject, ByVal e As RoutedEventArgs)
expander.IsExpanded = Not expander.IsExpanded
EndSubPrivateSub rbAzure_Checked(ByVal sender AsObject, ByVal e As RoutedEventArgs)
If gridControl1 IsNothingThenReturnEndIfIf rbAzure.IsChecked = TrueThen
ApplicationThemeHelper.ApplicationThemeName = "Office2016White"EndIfEndSubPrivateSub rbGray_Checked(ByVal sender AsObject, ByVal e As RoutedEventArgs)
If gridControl1 IsNothingThenReturnEndIfIf rbGray.IsChecked = TrueThen
ApplicationThemeHelper.ApplicationThemeName = "LightGray"EndIfEndSubPrivateSub rbOfficeBlack_Checked(ByVal sender AsObject, ByVal e As RoutedEventArgs)
If gridControl1 IsNothingThenReturnEndIfIf rbOfficeBlack.IsChecked = TrueThen
ApplicationThemeHelper.ApplicationThemeName = "Office2007Black"EndIfEndSubPrivateSub rbOfficeBlue_Checked(ByVal sender AsObject, ByVal e As RoutedEventArgs)
If gridControl1 IsNothingThenReturnEndIfIf rbOfficeBlue.IsChecked = TrueThen
ApplicationThemeHelper.ApplicationThemeName = "Office2007Blue"EndIfEndSubPrivateSub rbOfficeSilver_Checked(ByVal sender AsObject, ByVal e As RoutedEventArgs)
If gridControl1 IsNothingThenReturnEndIfIf rbOfficeSilver.IsChecked = TrueThen
ApplicationThemeHelper.ApplicationThemeName = "Office2007Silver"EndIfEndSubEndClassPartialPublicClass Person
PublicSubNew()
EndSubPublicSubNew(ByVal i AsInteger)
FirstName = "FirstName" & i
LastName = "LastName" & i
Age = i * 10EndSubPrivate _firstName AsStringPublicProperty LastName() AsStringPrivate _age AsIntegerPublicProperty FirstName() AsStringGetReturn _firstName
EndGetSet(ByVal value AsString)
_firstName = value
EndSetEndPropertyPublicProperty Age() AsIntegerGetReturn _age
EndGetSet(ByVal value AsInteger)
_age = value
EndSetEndPropertyEndClassPartialPublicClass MyViewModel
PublicSubNew()
CreateList()
EndSubPublicProperty ListPerson() As ObservableCollection(Of Person)
PrivateSub CreateList()
ListPerson = New ObservableCollection(Of Person)()
For i AsInteger = 0To9Dim p AsNew Person(i)
ListPerson.Add(p)
Next i
EndSubEndClassEndNamespace
ImportsSystemImportsSystem.Collections.GenericImportsSystem.ConfigurationImportsSystem.DataImportsSystem.LinqImportsSystem.WindowsNamespace DXExpander_CreatingAndUsing
'''<summary>''' Interaction logic for App.xaml'''</summary>PartialPublicClass App
Inherits Application
PrivateSub OnAppStartup_UpdateThemeName(ByVal sender AsObject, ByVal e As StartupEventArgs)
EndSubEndClassEndNamespace