Table of Contents

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

scrollViewer ScrollViewer

Avalonia.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

scrollViewer ScrollViewer

Avalonia.Controls.ScrollViewer.

visual Visual

Avalonia.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

scrollViewer ScrollViewer

Avalonia.Controls.ScrollViewer.

visual Visual

Avalonia.Visual inside Avalonia.Controls.ScrollViewer.

scrollToCenter bool

True 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

scrollViewer ScrollViewer

Avalonia.Controls.ScrollViewer.

visual Visual

Avalonia.Visual.

duration TimeSpan

Duration of smooth scrolling.

interpolator Func<double, double>

Interpolator of smooth scrolling.

scrollToCenter bool

True 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

scrollViewer ScrollViewer

Avalonia.Controls.ScrollViewer.

offset Vector

Target offset.

duration TimeSpan

Duration of smooth scrolling.

interpolator Func<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

scrollViewer ScrollViewer

Avalonia.Controls.ScrollViewer.

offset Vector

Target offset.

Returns

bool

True if tar offset got successfully.