You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: MAUI/Chat/scrolling.md
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,31 +49,6 @@ By default, the [SfChat](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Cha
49
49
{% endhighlight %}
50
50
{% endtabs %}
51
51
52
-
## Scrolled event
53
-
54
-
The [SfChat](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Chat.SfChat.html) control comes with a built-in `Scrolled` event that will be fired whenever the chat control is scrolled. You can get the current scroll offset, whether scrolling has reached the top or bottom of the message list in the [ChatScrolledEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Chat.ChatScrolledEventArgs.html). You can handle this event to restrict the auto-scroll in chat for newly added messages, if the user had already scrolled up manually and was currently not at the bottom of the chat when the new message was added.
// The chat will not be auto scrolled to the bottom
69
-
// if the user is not currently at the bottom end of the chat at the time of the arrival of the new message
70
-
// but rather already manually scrolled above to read old messages.
71
-
sfChat.CanAutoScrollToBottom = e.IsBottomReached;
72
-
}
73
-
74
-
{% endhighlight %}
75
-
{% endtabs %}
76
-
77
52
## Scroll to bottom button
78
53
79
54
The `SfChat` control provides the option to display a scroll to bottom button by setting the `ShowScrollToBottomButton` property to `true`. This button appears when scrolled up through older messages and allows quick navigation back to the latest message in the conversation.
@@ -171,3 +146,28 @@ namespace MauiChat
171
146
172
147
{% endhighlight %}
173
148
{% endtabs %}
149
+
150
+
## Scrolled event
151
+
152
+
The [SfChat](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Chat.SfChat.html) control comes with a built-in `Scrolled` event that will be fired whenever the chat control is scrolled. You can get the current scroll offset, whether scrolling has reached the top or bottom of the message list in the [ChatScrolledEventArgs](https://help.syncfusion.com/cr/maui/Syncfusion.Maui.Chat.ChatScrolledEventArgs.html). You can handle this event to restrict the auto-scroll in chat for newly added messages, if the user had already scrolled up manually and was currently not at the bottom of the chat when the new message was added.
0 commit comments