-1

I have a WPF Grid with 3 "sections": 1, 2, and 3.

When Horizontal (H) is moved, I need 1 and 3 to move.

When Vertical (V) is moved, I need 2 and 3 to move.

Is this possible with such a layout to use a ScrollViewer, or am I looking for a more complex solution?

Thanks.

enter image description here

BoJl4apa
  • 29
  • 4

1 Answers1

0

Answer found after some messing around.

  • wrap 1, 2, 3 in ScrollView controls
  • set (3) H and V ScrollBars to "Auto"
  • set (1) and (2) ScrollBars to "Hidden"
  • subscribe to (3) "ScrollChanged" event
  • set (2) ScrollToVerticalOffset() with (3).VerticalOffset
  • set (1) ScrollToHorizontalOffset() with (3).HorizontalOffset

Thanks Synchronized scrolling of two ScrollViewers whenever any one is scrolled in wpf

BoJl4apa
  • 29
  • 4