ScrollableControlExtensions
Wisej.Web.Markup.ScrollableControlExtensions
Namespace: Wisej.Web.Markup
Assembly: Wisej.Framework (4.0.0.0)
Adds fluent markup extension methods to the ScrollableControl class.
public class ScrollableControlExtensions
Methods
AutoScroll<TControl>(control, autoScroll)

Sets the AutoScroll property for the specified ScrollableControl, enabling or disabling automatic scrolling.
autoScroll
A boolean value indicating whether to enable automatic scrolling. Default is false
.
Returns: TControl. The scrollable control with the updated AutoScroll property.
This method allows you to control whether the control automatically displays scroll bars when its contents exceed its visible boundaries.
myScrollableControl.AutoScroll(true);
AutoScrollMargin<TControl>(control, autoScrollMargin)

Sets the AutoScrollMargin property of the specified ScrollableControl.
Returns: TControl. The modified control with the updated AutoScrollMargin property.
This method allows you to specify the margin around the scrollable area of the control.
myScrollableControl.AutoScrollMargin(new Size(10, 10));
AutoScrollMinSize<TControl>(control, autoScrollMinSize)

Sets the AutoScrollMinSize property of the specified ScrollableControl.
Returns: TControl. The modified control with the updated AutoScrollMinSize property.
This method allows you to specify the minimum size of the scrollable area of the control.
myScrollableControl.AutoScrollMinSize(new Size(100, 100));
OnScroll<TControl>(control, action)

Attaches a scroll event handler to a ScrollableControl.
TControl
The type of the scrollable control.
Returns: TControl. The control with the attached scroll event handler.
This method allows you to easily attach a scroll event handler to a scrollable control. The provided action is executed whenever the scroll event occurs.
var myScrollableControl = new MyScrollableControl();
myScrollableControl.OnScroll((control, args) =>
{
// Handle scroll event
});
ScrollBars<TControl>(control, scrollBars)

Sets the ScrollBars property of the specified ScrollableControl.
Returns: TControl. The modified control with the updated ScrollBars property.
This method allows you to specify which scroll bars are displayed for the control. This is assumed to be part of a custom implementation.
myScrollableControl.ScrollBars(ScrollBars.Both);
Last updated
Was this helpful?