C# – How to add a ScrollBar to a Stackpanel

cscrollbarsstackpanelwpfxaml

In my WPF application, I have a Stackpanel containing several controls inside them. How can I add a Scrollbar to this stackpanel.

Best Answer

Put it into a ScrollViewer.