Class ScrollSlider
The ScrollSlider can be dragged with the mouse, constrained by the size of the Viewport of it's superview. The ScrollSlider can be oriented either vertically or horizontally.
public class ScrollSlider : View, IDisposable, ISupportInitializeNotification, ISupportInitialize, IOrientation, IDesignable
- Inheritance
-
ScrollSlider
- Implements
- Inherited Members
Remarks
Used to represent the proportion of the visible content to the Viewport in a Scrolled.
Constructors
- ScrollSlider()
Initializes a new instance.
Properties
- Orientation
Gets or sets the orientation of the View.
- Position
Gets or sets the position of the ScrollSlider relative to the size of the ScrollSlider's Frame. The position will be constrained such that the ScrollSlider will not go outside the Viewport of the SuperView.
- Size
Gets or sets the size of the ScrollSlider. This is a helper that gets or sets Width or Height depending on Orientation. The size will be clamped between 1 and the dimension of the SuperView's Viewport.
- SliderPadding
Gets or sets the amount to pad the start and end of the scroll slider. The default is 0.
- VisibleContentSize
Gets or sets the size of the viewport into the content being scrolled. If not explicitly set, will be the greater of 1 and the dimension of the SuperView.
Methods
- CalculateSize(int, int, int)
Gets the slider size.
- EnableForDesign()
Causes the View to enable design-time mode. This typically means that the view will load demo data and be configured to allow for design-time manipulation.
- GetNormalColor()
Determines the current ColorScheme based on the Enabled value.
- OnClearingViewport()
Called when the Viewport is to be cleared.
- OnMouseEvent(MouseEventArgs)
Called when a mouse event occurs within the view's Viewport.
- OnOrientationChanged(Orientation)
Called when Orientation has been changed.
- OnPositionChanged(int)
Called when Position has changed.
- OnPositionChanging(int, int)
Called when Position is changing. Return true to cancel the change.
- OnScrolled(int)
Called when Position has changed. Indicates how much to scroll.
Events
- OrientationChanged
Raised when Orientation has changed.
- OrientationChanging
Raised when Orientation is changing. Can be cancelled.
- PositionChanged
Raised when the Position has changed.
- PositionChanging
Raised when the Position is changing. Set Cancel to true to prevent the position from being changed.