Scroll Experience in Windows Forms Popup (PopupControlContainer)

4 Feb 20251 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)

AutoScroll