Class SnappingLayout
public class SnappingLayout : SkiaLayout, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISkiaGestureListener, IHasAfterEffects, ISkiaDisposable, ISkiaGridLayout, ISkiaLayout, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ILayoutInsideViewport, IInsideViewport, IVisibilityAware, IDisposable
- Inheritance
-
SnappingLayout
- Implements
- Derived
- Inherited Members
- Extension Methods
Fields
AnimatedProperty
public static readonly BindableProperty AnimatedProperty
Field Value
AnimatorRange
protected RangeVectorAnimator AnimatorRange
Field Value
AutoVelocityMultiplyPtsProperty
public static readonly BindableProperty AutoVelocityMultiplyPtsProperty
Field Value
BouncesProperty
public static readonly BindableProperty BouncesProperty
Field Value
IgnoreWrongDirectionProperty
public static readonly BindableProperty IgnoreWrongDirectionProperty
Field Value
InTransitionProperty
public static readonly BindableProperty InTransitionProperty
Field Value
RespondsToGesturesProperty
public static readonly BindableProperty RespondsToGesturesProperty
Field Value
RubberDampingProperty
public static readonly BindableProperty RubberDampingProperty
Field Value
RubberEffectProperty
public static readonly BindableProperty RubberEffectProperty
Field Value
TransitionDirectionProperty
public static readonly BindableProperty TransitionDirectionProperty
Field Value
VectorAnimatorSpring
protected SpringWithVelocityVectorAnimator VectorAnimatorSpring
Field Value
Properties
Animated
public bool Animated { get; set; }
Property Value
AutoVelocityMultiplyPts
If velocity is near 0 define how much we multiply the auto-velocity used to animate snappoing point. For example when in carousel you cancel the swipe and release finger..
public double AutoVelocityMultiplyPts { get; set; }
Property Value
Bounces
public bool Bounces { get; set; }
Property Value
CanAnimate
public virtual bool CanAnimate { get; }
Property Value
ContentOffsetBounds
There are the bounds the scroll offset can go to.. This are NOT the bounds of the whole content.
protected SKRect ContentOffsetBounds { get; set; }
Property Value
CurrentPosition
public Vector2 CurrentPosition { get; protected set; }
Property Value
CurrentSnap
protected Vector2 CurrentSnap { get; set; }
Property Value
IgnoreWrongDirection
Will ignore gestures of the wrong direction, like if this Orientation is Horizontal will ignore gestures with vertical direction velocity
public bool IgnoreWrongDirection { get; set; }
Property Value
InTransition
public bool InTransition { get; set; }
Property Value
RespondsToGestures
Can be open/closed by gestures along with code-behind, default is true
public bool RespondsToGestures { get; set; }
Property Value
RubberDamping
If Bounce is enabled this basically controls how less the scroll will bounce when displaced from limit by finger or inertia. Default is 0.8.
public double RubberDamping { get; set; }
Property Value
RubberEffect
If Bounce is enabled this basically controls how far from the limit can the scroll be elastically offset by finger or inertia. Default is 0.15.
public double RubberEffect { get; set; }
Property Value
ScrollLocked
protected bool ScrollLocked { get; set; }
Property Value
SnapDistanceRatio
0.2 - Part of the distance between snap points the velocity need to cover to trigger going to the next snap point. NOT a bindable property (yet).
public double SnapDistanceRatio { get; set; }
Property Value
SnapPoints
public IList<Vector2> SnapPoints { get; set; }
Property Value
TransitionDirection
public LinearDirectionType TransitionDirection { get; set; }
Property Value
Viewport
Using this instead of RenderingViewport
protected SKRect Viewport { get; set; }
Property Value
Methods
ApplyOptions(bool)
public virtual void ApplyOptions(bool initialize)
Parameters
initializebool
ApplyPosition(Vector2)
public virtual void ApplyPosition(Vector2 position)
Parameters
positionVector2
CheckTransitionEnded()
public virtual bool CheckTransitionEnded()
Returns
ClampOffset(float, float, bool)
public virtual Vector2 ClampOffset(float x, float y, bool rubber)
Parameters
Returns
ClampOffsetWithRubberBand(float, float)
Called for manual finger panning
protected virtual Vector2 ClampOffsetWithRubberBand(float x, float y)
Parameters
Returns
FindNearestAnchor(Vector2)
public virtual Vector2 FindNearestAnchor(Vector2 current)
Parameters
currentVector2
Returns
FindNearestAnchorInternal(Vector2, Vector2)
protected virtual Vector2 FindNearestAnchorInternal(Vector2 current, Vector2 velocity)
Parameters
Returns
GetAutoVelocity(Vector2)
todo calc upon measured size + prop for speed
protected virtual Vector2 GetAutoVelocity(Vector2 displacement)
Parameters
displacementVector2
Returns
GetContentOffsetBounds()
There are the bounds the scroll offset can go to.. This are NOT the bounds of the whole content.
public virtual SKRect GetContentOffsetBounds()
Returns
NeedApplyOptions(BindableObject, object, object)
protected static void NeedApplyOptions(BindableObject bindable, object oldvalue, object newvalue)
Parameters
bindableBindableObjectoldvalueobjectnewvalueobject
OnTransitionChanged()
Invokes TransitionChanged event
public virtual void OnTransitionChanged()
OnWillDisposeWithChildren()
The OnDisposing might come with a delay to avoid disposing resources at use. This method will be called without delay when Dispose() is invoked. Disposed will set to True and for Views their OnWillDisposeWithChildren will be called.
public override void OnWillDisposeWithChildren()
Render(DrawingContext)
public override void Render(DrawingContext context)
Parameters
contextDrawingContext
ScrollToNearestAnchor(Vector2, Vector2)
public virtual void ScrollToNearestAnchor(Vector2 location, Vector2 velocity)
Parameters
ScrollToOffset(Vector2, Vector2, bool)
protected virtual bool ScrollToOffset(Vector2 targetOffset, Vector2 velocity, bool animate)
Parameters
Returns
SelectNextAnchor(Vector2, Vector2)
Return an anchor depending on direction and strength of of the velocity
public virtual Vector2 SelectNextAnchor(Vector2 origin, Vector2 velocity)
Parameters
Returns
SendScrolled()
public virtual void SendScrolled()
UpdateReportedPosition()
public virtual void UpdateReportedPosition()
Events
Scrolled
public event EventHandler<Vector2> Scrolled
Event Type
TransitionChanged
public event EventHandler<bool> TransitionChanged
Event Type
ViewportReady
public event EventHandler ViewportReady