Table of Contents

Class ScrollNode

Namespace
Fantas.UI
Assembly
Fantas.dll

Scrollable Node

public class ScrollNode : SpriteNode
Inheritance
ScrollNode
Derived
Inherited Members
Extension Methods

Constructors

ScrollNode(Color, SizeF)

public ScrollNode(Color color, SizeF size)

Parameters

color Color
size SizeF

ScrollNode(SizeF)

Create a scrollable node with the given size

public ScrollNode(SizeF size)

Parameters

size SizeF

Properties

ContentArea

ScrollNode content area

public SizeF ContentArea { get; set; }

Property Value

SizeF

MaxXScrollPosition

Max horizontal scroll position

public float MaxXScrollPosition { get; }

Property Value

float

MaxYScrollPosition

Max horizontal scroll position

public float MaxYScrollPosition { get; }

Property Value

float

MinXScrollPosition

Min horizontal scroll position

public float MinXScrollPosition { get; }

Property Value

float

MinYScrollPosition

Min horizontal scroll position

public float MinYScrollPosition { get; }

Property Value

float

ScrollPosition

Scroll position offset

public PointF ScrollPosition { get; set; }

Property Value

PointF

ViewportBottom

Content Viewport Bottom

public float ViewportBottom { get; }

Property Value

float

ViewportLeft

Content Viewport Bottom

public float ViewportLeft { get; }

Property Value

float

ViewportRight

Content Viewport Right

public float ViewportRight { get; }

Property Value

float

ViewportTop

Content Viewport Top

public float ViewportTop { get; }

Property Value

float

XScrollPosition

Horizontal Scroll Position

public float XScrollPosition { get; set; }

Property Value

float

YScrollPosition

Vertical Scroll Position

public float YScrollPosition { get; set; }

Property Value

float

Methods

AddChild(Node)

public void AddChild(Node node)

Parameters

node Node

AnimateScrollPosition(PointF, double)

Start animation to move scroll position within "duration" in seconds

public void AnimateScrollPosition(PointF position, double duration)

Parameters

position PointF
duration double

AnimateXScrollPosition(float, double)

Start animation to move scroll X position within "duration" in seconds

public void AnimateXScrollPosition(float position, double duration)

Parameters

position float
duration double

AnimateYScrollPosition(float, double)

Start animation to move scroll Y position within "duration" in seconds

public void AnimateYScrollPosition(float position, double duration)

Parameters

position float
duration double

OnMouseWheel(MouseEventArgs)

public override void OnMouseWheel(MouseEventArgs args)

Parameters

args MouseEventArgs

OnPan(PanEventArgs)

public override void OnPan(PanEventArgs args)

Parameters

args PanEventArgs

OnPanComplete(PanEventArgs)

public override void OnPanComplete(PanEventArgs args)

Parameters

args PanEventArgs

OnPanStart(PanEventArgs)

public override void OnPanStart(PanEventArgs args)

Parameters

args PanEventArgs

OnScrollPositionChanged()

Called when ScrollPosition is changed

protected virtual void OnScrollPositionChanged()

OnSizeChanged()

Called when size changes

protected override void OnSizeChanged()

OnTouchDownInside(TouchEventArgs)

public override void OnTouchDownInside(TouchEventArgs args)

Parameters

args TouchEventArgs

ScrollBy(Vector2)

Scroll By delta

public void ScrollBy(Vector2 delta)

Parameters

delta Vector2

ScrollToBottom()

Scroll to bottom

public void ScrollToBottom()

ScrollToBottom(double)

Scroll to bottom animated

public void ScrollToBottom(double duration)

Parameters

duration double

ScrollToLeft()

Scroll to left

public void ScrollToLeft()

ScrollToLeft(double)

Scroll to left animated

public void ScrollToLeft(double duration)

Parameters

duration double

ScrollToRight()

Scroll to right

public void ScrollToRight()

ScrollToRight(double)

Scroll to right animated

public void ScrollToRight(double duration)

Parameters

duration double

ScrollToTop()

Scroll to top

public void ScrollToTop()

ScrollToTop(double)

Scroll to top animated

public void ScrollToTop(double duration)

Parameters

duration double

UpdateContentArea()

Update ContentArea with children size

public void UpdateContentArea()