Situation:
I have a vertically orientated stack panel inside a ScrollViewer. The stack panel is configured to horizontally center-align its children. The scroll bar always appears at the right edge of the stack panel, which is what I want.
Then I fill the stack panel with children (user controls) of fixed widths, but all children are less wide than the stack panel. This leaves "empty space" to the left and right of the children. Visually, this does not matter, because background color is the same (which is nice).
But: In order to vertically scroll the stack panel using the mouse wheel, the mouse cursor seemingly must be positioned on top of one of the children. If the mouse cursor is positioned too much to the left or to the right (=over "empty space" in the stack panel) scrolling does not work!
Question:
How can I ensure that scrolling always works, no matter where I position the mouse cursor over the stack panel?
Martin.