Class ScrollDirectionValueExtension
- Namespace
- Nalu
- Assembly
- Nalu.Maui.Scaffold.dll
Switches the target property between two values from the scroll DIRECTION: scrolling down
ActivateThreshold dp animates it from
Deactivated to Activated, scrolling back up
DeactivateThreshold dp animates it back —
wherever in the content that happens (unlike ScrollValueExtension, which maps the
absolute offset). Starts deactivated, and the top of the content always restores deactivated.
Works on numeric, bool, Color and Brush properties (solid or gradient brush endpoints; bools flip at the transition midpoint), on any element
inside the scaffold's tree:
TranslationY="{nalu:ScrollDirectionValue Deactivated=0, Activated=80, ActivateThreshold=48, DeactivateThreshold=24}".
Must be applied directly on the target's bindable property — Style setters are not supported.
For theme-dependent endpoints use ThemeScrollDirectionValueExtension.
[RequireService(new Type[] { typeof(IProvideValueTarget) })]
public sealed class ScrollDirectionValueExtension : ScrollDirectionValueExtensionBase, IMarkupExtension<BindingBase>, IMarkupExtension
- Inheritance
-
ScrollDirectionValueExtension
- Implements
- Inherited Members
Properties
Activated
Gets or sets the value of the activated state.
public object? Activated { get; set; }
Property Value
Deactivated
Gets or sets the value of the deactivated state (the initial one).
public object? Deactivated { get; set; }