Class ScrollViewerExtensions
- Namespace
- CarinaStudio.Controls
- Assembly
- CarinaStudio.AppBase.Application.Avalonia.dll
Extensions for Avalonia.Controls.ScrollViewer.
public static class ScrollViewerExtensions
- Inheritance
-
ScrollViewerExtensions
- Inherited Members
Methods
IsSmoothScrolling(ScrollViewer)
Check whether given Avalonia.Controls.ScrollViewer is performing smooth scrolling or not.
public static bool IsSmoothScrolling(this ScrollViewer scrollViewer)
Parameters
scrollViewerScrollViewerAvalonia.Controls.ScrollViewer.
Returns
- bool
True if Avalonia.Controls.ScrollViewer is performing smooth scrolling.
ScrollIntoView(ScrollViewer, Visual)
Scroll given Avalonia.Visual in Avalonia.Controls.ScrollViewer into view.
public static bool ScrollIntoView(this ScrollViewer scrollViewer, Visual visual)
Parameters
scrollViewerScrollViewerAvalonia.Controls.ScrollViewer.
visualVisualAvalonia.Visual inside Avalonia.Controls.ScrollViewer.
Returns
- bool
True if visual has been scrolled into view.
ScrollIntoView(ScrollViewer, Visual, bool)
Scroll given Avalonia.Visual in Avalonia.Controls.ScrollViewer into view.
public static bool ScrollIntoView(this ScrollViewer scrollViewer, Visual visual, bool scrollToCenter)
Parameters
scrollViewerScrollViewerAvalonia.Controls.ScrollViewer.
visualVisualAvalonia.Visual inside Avalonia.Controls.ScrollViewer.
scrollToCenterboolTrue to try scrolling Avalonia.Visual to center of viewport.
Returns
- bool
True if visual has been scrolled into view.
SmoothScrollIntoView(ScrollViewer, Visual, TimeSpan, Func<double, double>?, bool)
Scroll given Avalonia.Visual smoothly into viewport of Avalonia.Controls.ScrollViewer.
public static bool SmoothScrollIntoView(this ScrollViewer scrollViewer, Visual visual, TimeSpan duration, Func<double, double>? interpolator = null, bool scrollToCenter = true)
Parameters
scrollViewerScrollViewerAvalonia.Controls.ScrollViewer.
visualVisualAvalonia.Visual.
durationTimeSpanDuration of smooth scrolling.
interpolatorFunc<double, double>Interpolator of smooth scrolling.
scrollToCenterboolTrue to scroll content to center of viewport.
Returns
- bool
True if smooth scrolling starts successfully.
SmoothScrollTo(ScrollViewer, Vector, TimeSpan, Func<double, double>?)
Scroll Avalonia.Controls.ScrollViewer to given offset smoothly.
public static bool SmoothScrollTo(this ScrollViewer scrollViewer, Vector offset, TimeSpan duration, Func<double, double>? interpolator = null)
Parameters
scrollViewerScrollViewerAvalonia.Controls.ScrollViewer.
offsetVectorTarget offset.
durationTimeSpanDuration of smooth scrolling.
interpolatorFunc<double, double>Interpolator of smooth scrolling.
Returns
- bool
True if smooth scrolling starts successfully.
TryGetSmoothScrollingTargetOffset(ScrollViewer, out Vector)
Try getting target offset of smooth scrolling.
public static bool TryGetSmoothScrollingTargetOffset(this ScrollViewer scrollViewer, out Vector offset)
Parameters
scrollViewerScrollViewerAvalonia.Controls.ScrollViewer.
offsetVectorTarget offset.
Returns
- bool
True if tar offset got successfully.