How to add customized typing indicator using c# in Azure bot


I am building a chat application using botframework v4 with .net core. I want to implement customized typing indicator. Currently I am using below code and it is showing typing indicator like below image.

  public async override Task OnTurnAsync(ITurnContext turnContext, CancellationToken cancellationToken = default)  
        ITypingActivity replyActivity = Activity.CreateTypingActivity();   
        await turnContext.SendActivityAsync((Activity)replyActivity);   
        await Task.Delay(5000);  
        await base.OnTurnAsync(turnContext, cancellationToken);  


But instead of showing this typing symbol(...), I need to show some customized message (like bot is typing) and after getting bot response indicator need to remove automatically.

Azure Bot Service
Azure Bot Service
An Azure service that provides an integrated environment for bot development.
539 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,005 questions
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 24,636 Reputation points Microsoft Employee


    Thanks for the your patience. This can be done in defaultstyleoption.js file. You can also customize other item according to your requirement.

    Please see the 139 line of the file.


    No comments