0

I have a Scrollviewer inside of Stackpanel. It works well if I'm trying to scroll down with a scroll on the mouse but if I use the scroll on the scroll bar it's being decreased and the page doesn't go down. Moreover, assume there's a radio group of 5 radio buttons(2 of them are on the bottom of the screen and 3 are lower). If I try to select one of two accessible radio buttons the page is scrolled down until all five are seen and no button is checked. How can I solve this problem?

2
  • 1
    can you post some code? preferably the XAML you are using Commented Sep 8, 2011 at 19:54
  • I can picture a ScrollViewer around a StackPanel, not inside. Commented Sep 8, 2011 at 20:01

1 Answer 1

2

The ScrollViewer should hold the StackPanel as Content, and you have to set MaxWidth/MaxHeight on the ScrollViewer beyond which the ScrollBar will show.

This is because StackPanel doesn't play well with scrolling since it is made to take just the space needed for its content.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.