Skip to main content
All docs
V26.1
  • AIChatControl.HideLoadingIndicatorAsync() Method

    Hides the loading indicator in the chat message area.

    Namespace: DevExpress.AIIntegration.WinForms.Chat

    Assembly: DevExpress.AIIntegration.WinForms.Chat.v26.1.dll

    NuGet Package: DevExpress.AIIntegration.WinForms.Chat

    Declaration

    public Task HideLoadingIndicatorAsync()

    Returns

    Type Description
    Task

    A task that represents the asynchronous operation.

    Remarks

    Use the following methods to display a loading indicator while the application performs a long-running operation, such as preparation of additional context before a request to the AI service:

    Example

    The following example displays the indicator with a custom caption when a user sends a message, and hides the indicator after the operation completes:

    using DevExpress.AIIntegration.Blazor.Chat.WebView;
    
    async void AiChatControl1_MessageSending(object sender, AIChatControlMessageSendingEventArgs e) {
        await e.Chat.ShowLoadingIndicatorAsync("Fetching additional context...");
        // Perform a long-running operation (load data, call an external API, etc.).
        await Task.Delay(2000);
        await e.Chat.HideLoadingIndicatorAsync();
    }
    

    Refer to the following help topic for additional information: AI Chat Control

    See Also