Scrolling with the mouse wheel scrolls directly to the bottom of the messages instead of scrolling smoothly between the items.
To work this around, create a custom class that derives from RadChat and override its OnPointerWheelChanged method.
public class CustomChat : RadChat
{
private ScrollViewer scrollViewer;
internal ScrollViewer ScrollViewer
{
get
{
if (this.scrollViewer == null)
{
this.scrollViewer = this.ChildrenOfType<ScrollViewer>().Where(sc => sc.Name == "PART_ScrollViewer").FirstOrDefault();
}
return this.scrollViewer;
}
}
protected override void OnPointerWheelChanged(PointerRoutedEventArgs e)
{
if (this.ScrollViewer != null)
{
int delta = e.GetCurrentPoint(this).Properties.MouseWheelDelta;
double wheelDetents = delta / 120.0;
double scrollableRange = ScrollViewer.ExtentHeight - ScrollViewer.ViewportHeight;
double step = 0.01 * scrollableRange;
double offsetDelta = wheelDetents * step;
double newOffset = ScrollViewer.VerticalOffset - offsetDelta;
newOffset = Math.Max(0, Math.Min(ScrollViewer.ExtentHeight, newOffset));
ScrollViewer.ScrollToVerticalOffset(newOffset);
}
}
}