LoadingIndicatorButtonInfo Class
Represents a loading indicator displayed within the ButtonEdit and its descendants.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Remarks
The LoadingIndicatorButtonInfo class implements the functionality of a loading indicator displayed within the button editors (e.g., ButtonEdit, DateEdit, etc.).
How to Add the Loading Indicator
Add a LoadingIndicatorButtonInfo class instance to the editor’s ButtonEdit.Buttons (ButtonEditSettings.Buttons for the in-place ButtonEdit) collection.
To display and hide the loading indicator, use its Visibility property.
Example
The code sample below illustrates how to show the LoadingIndicatorButtonInfo during the long running operation and hide the loading indicator when the operation is complete.
<dxe:ButtonEdit
AllowDefaultButton="False">
<dxe:ButtonEdit.Buttons>
<dxe:LoadingIndicatorButtonInfo Visibility="Collapsed" x:Name="loadingIndicator"/>
<dxe:ButtonInfo GlyphKind="Refresh" Click="ButtonInfo_Click"/>
</dxe:ButtonEdit.Buttons>
</dxe:ButtonEdit>
private async void ButtonInfo_Click(object sender, RoutedEventArgs e) {
loadingIndicator.Visibility = Visibility.Visible;
// Perform a long running operation instead of Task.Delay
await Task.Delay(2000);
loadingIndicator.Visibility = Visibility.Collapsed;
e.Handled = true;
}
The animation below illustrates the result: