Our What's New in v24.2 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
If you have any questions, submit a ticket to our Support Center.
No
Your feedback is appreciated.
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts.
Privacy Preference Center
When you visit a Developer Express Inc (“DevExpress”) website, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences or your device and is mostly used to make the site work as you expect it to. While the information does not usually directly identify you, it can give you a more personalized web experience. Because DevExpress respects your right to privacy, you can choose to disallow/disable the use of certain cookies. Click on different category headings to learn more and change our default settings. Keep in mind that blocking some types of cookies may impact your experience on the site and may affect the services DevExpress is able to offer to you. You cannot opt-out of our use of strictly necessary cookies as they are used to ensure the proper functioning of our Websites (such as remembering your settings, allowing you to log into your account, and other similar purposes). You may, however, opt-out of receiving and our use of non-essential cookies (including preference, functional, and targeting cookies) by changing your settings for each category listed below.
[Videos]
Our use of cookies may also collect information about what videos you have watched on our websites. You may opt-out of these cookies by changing your settings for functional and advertising cookies. We will ask you to review and update your choices at least once every two (2) years. By continuing to allow us to use these cookies you explicitly consent to our use of cookies and our disclosure of what videos you have watched on our Websites to our video hosting providers, such as YouTube, for a period of up to two (2) years.
Manage Consent Preferences
Strictly Necessary Cookies
Always Active
These cookies are necessary for the website to function properly and cannot be disabled. They are usually set in response to actions initiated by you – actions that amount to a request for services, such as setting your privacy preferences, logging onto the website, or populating website forms. You can set your browser to block or alert you about these cookies, but certain portions of the site will not work properly when these cookies are disabled. These cookies do not store any personally identifiable information.
Performance Cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand page popularity and determine how visitors move around the site. All information collected by these cookies are aggregated and therefore anonymous. If you disallow/disable these cookies, we will not know when you have visited our site and we will not be able to monitor its performance.
Functional Cookies
These cookies allow the website to provide enhanced functionality and personalization. They may be set by us or by third party providers whose services we have added to our pages. If you disallow/disable these cookies, some or all of these services may fail to function properly.
Targeting Cookies
These cookies may be set through our site by our advertising partners. They may be used by advertising partners to build a profile of your interests and display relevant advertisements on other sites. While these cookies do not store personal information, they do identify your browser and internet device. If you disallow/disable these cookies, you will experience less targeted advertising.