ScrollView

A scrolling container for a single child.
public class ScrollView : Panel

Properties

AvoidsKeyboard

Whether the content is inset so the keyboard never covers the focused control.

Type: bool

public bool AvoidsKeyboard { get; set; }

Content

The single scrollable child.

Type: View?

public View? Content { get; set; }

IndicatorInsets

Insets the scroll indicator from the edges, or null to track the content insets.

Type: Thickness?

public Thickness? IndicatorInsets { get; set; }

IndicatorStyle

The color of the scroll indicator.

Type: IndicatorStyle

public IndicatorStyle IndicatorStyle { get; set; }

IsRefreshing

Whether the refresh spinner is showing.

With a two-way binding, pulling sets it to true and the ViewModel sets it to false when done.

Type: Bindable<bool>

public Bindable<bool> IsRefreshing { get; set; }

KeyboardDismiss

How dragging the scroll view dismisses the keyboard.

Type: KeyboardDismiss

public KeyboardDismiss KeyboardDismiss { get; set; }

Orientation

The scroll axis.

Type: Orientation

public Orientation Orientation { get; set; }

Paging

Whether scrolling snaps to whole viewport pages.

Type: bool

public bool Paging { get; set; }

RefreshCommand

Command invoked when the user pulls to refresh.

Setting it installs the refresh control. The ICommand.CanExecute controls whether the user can pull to refresh.

Type: ICommand?

public ICommand? RefreshCommand { get; set; }

RefreshCommandParameter

The parameter passed to RefreshCommand.

Type: object?

public object? RefreshCommandParameter { get; set; }

Scrolled

Invoked as the view scrolls, with the offset in points.

Type: Action<double>?

public Action<double>? Scrolled { get; set; }

ShowsIndicator

Whether the scroll indicator is shown.

Type: bool

public bool ShowsIndicator { get; set; }

Methods

ArrangeOverride

Content arrangement. Panels override to place their children.

protected override Size ArrangeOverride(
  Size finalSize)
ParameterSummary
Size finalSizeThe final size available for the view's content.

Returns

  • Size: The arranged content size.

MeasureOverride

Content measurement. Panels recurse; controls delegate to the native SizeThatFits.

protected override Size MeasureOverride(
  Size availableSize)
ParameterSummary
Size availableSizeThe size available for the view's content.

Returns

  • Size: The desired content size.

ScrollTo

Scrolls to an offset along the scroll axis, in points.

public void ScrollTo(
  double offset,
  bool animated = true)
ParameterSummary
double offsetThe target offset in points.
(optional) bool animatedWhether to animate the scroll.