Table of Contents

Class ScrollDirectionValueExtensionBase

Namespace
Nalu
Assembly
Nalu.Maui.Scaffold.dll

Shared machinery of ScrollDirectionValueExtension and ThemeScrollDirectionValueExtension: a two-state value driven by the scroll DIRECTION rather than the scroll position. Scrolling down by ActivateThreshold dp latches the activated state, scrolling up by DeactivateThreshold dp latches back to deactivated (the initial state), wherever in the content that movement happens — the classic "chrome slips away as you read on, returns the moment you scroll back" pattern. Each state flip animates the target between the two endpoint values over ActivateDuration/DeactivateDuration. Not derivable outside this library — use ScrollDirectionValueExtension or ThemeScrollDirectionValueExtension.

public abstract class ScrollDirectionValueExtensionBase : IMarkupExtension<BindingBase>, IMarkupExtension
Inheritance
ScrollDirectionValueExtensionBase
Implements
Derived
Inherited Members

Properties

ActivateDuration

Gets or sets the deactivated → activated transition duration in milliseconds (default 250; 0 snaps).

public uint ActivateDuration { get; set; }

Property Value

uint

ActivateThreshold

Gets or sets the downward travel (dp) that latches the activated state (default 100). Travel accumulates while the scroll keeps moving down; any upward movement restarts the count. Zero latches on the first downward frame.

public double ActivateThreshold { get; set; }

Property Value

double

DeactivateBelow

Gets or sets the scroll offset at or below which the deactivated state is always restored (default 0 = the content top): resting at the top never leaves the activated mode stuck on.

public double DeactivateBelow { get; set; }

Property Value

double

DeactivateDuration

Gets or sets the activated → deactivated transition duration in milliseconds (defaults to ActivateDuration).

public uint? DeactivateDuration { get; set; }

Property Value

uint?

DeactivateThreshold

Gets or sets the upward travel (dp) that latches back to deactivated (defaults to ActivateThreshold). Zero latches on the first upward frame.

public double? DeactivateThreshold { get; set; }

Property Value

double?

Easing

Gets or sets the time curve of both transitions (null = linear).

public Easing? Easing { get; set; }

Property Value

Easing

Methods

ProvideValue(IServiceProvider)

[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(Scaffold))]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(ScaffoldNavBarContext))]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(ScrollValueThemeListener))]
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties, typeof(ScrollDirectionAnimator))]
public BindingBase ProvideValue(IServiceProvider serviceProvider)

Parameters

serviceProvider IServiceProvider

Returns

BindingBase