wpf-devexpress-dot-xpf-dot-editors-ef4967c8.md
Represents a loading indicator displayed within the ButtonEdit and its descendants.
Namespace : DevExpress.Xpf.Editors
Assembly : DevExpress.Xpf.Core.v25.2.dll
NuGet Package : DevExpress.Wpf.Core
public class LoadingIndicatorButtonInfo :
ButtonInfoBase
Public Class LoadingIndicatorButtonInfo
Inherits ButtonInfoBase
The LoadingIndicatorButtonInfo class implements the functionality of a loading indicator displayed within the button editors (e.g., ButtonEdit, DateEdit, etc.).
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.
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;
}
Private Async Sub ButtonInfo_Click(ByVal sender As Object, ByVal e As RoutedEventArgs)
loadingIndicator.Visibility = Visibility.Visible
' Perform a long running operation instead of Task.Delay
Await Task.Delay(2000)
loadingIndicator.Visibility = Visibility.Collapsed
e.Handled = True
End Sub
The animation below illustrates the result:
Object DispatcherObject DependencyObject ContentElement FrameworkContentElement ButtonInfoBase LoadingIndicatorButtonInfo
See Also