Scroll Experience in Windows Forms Popup (PopupControlContainer)
9 Dec 2019 / 1 minute to read
AutoScroll option is mainly used to improve the work experience of the control, especially when there are items present beyond its actual size, by enabling scrollbar automatically. We can enable scrollbars for the PopupContainer control by setting AutoScroll
property to true
. When AutoScroll is enabled for the control, we can set the margin and logical size for the scroll region by AutoScrollMargin
and AutoScrollMinSize
properties.
The below code snippet will explain how to enable automatic scrolling in PopupControlContainer control.
this.popupControlContainer1.AutoScroll = true;
this.popupControlContainer1.AutoScrollMargin = new System.Drawing.Size(2, 2);
this.popupControlContainer1.AutoScrollMinSize = new System.Drawing.Size(3, 3);
Me.popupControlContainer1.AutoScroll = True
Me.popupControlContainer1.AutoScrollMargin = New System.Drawing.Size(2, 2)
Me.popupControlContainer1.AutoScrollMinSize = New System.Drawing.Size(3, 3)
Was this page helpful?
Yes
No
Thank you for your feedback!
Thank you for your feedback and comments. We will rectify this as soon as possible!
An unknown error has occurred. Please try again.
Help us improve this page