Typing Indicator
The TypingIndicator
functionality of the Conversational UI can be used to indicate that an Author
is typing. This is done through the following properties.
-
TypingIndicatorVisibility
: It is of typeVisibility
. By default its value is set toCollapsed
. In order for the typing indicator to be displayed it can be set toVisible
. -
TypingIndicatorText
: A string property that specifies what text to be displayed when anAuthor
is typing. -
TypingIndicatorIcon
: AnImageSource
property through which a custom icon for theTypingIndicator
can be applied.
Setting the TypingIndicator
var textMessage = new TextMessage(this.currentAuthor, "Hello", "sent");
textMessage.InlineViewModel.StatusVisibility = Microsoft.UI.Xaml.Visibility.Visible;
this.chat.AddMessage(textMessage);
this.chat.TypingIndicatorText = this.otherAuthor.Name + " is typing...";
this.chat.TypingIndicatorVisibility = Microsoft.UI.Xaml.Visibility.Visible;