0

I have an issue with the Windows.UI.Xaml.Controls.ScrollViewer.

It does not work as I'd like it to (doh). If I put a Canvas inside and want to draw on it I can't as all the events from Canvas are passed down to the ScrollViewer. So my solution to the problem would be rather simple if I could have controlled what goes on in the ScrollViewer when the event is received (ditch it, pass it to Canvas, call the base for zoom, etc.) - but it seems like I can't do this as the ScrollViewer is sealed class.

This would work in WPF but does not work in XAML.

Any ideas out there how to solve this rather stupid issue?

The only thing I can come up right now is to ditch the ScrollViewer and implement my own zoom and scroll functions on the Canvas class. :\ Would like to avoid this if possible.

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364
Puhek
  • 475
  • 3
  • 13

1 Answers1

1

You have two options - implement your own ScrollViewer or put something transparent over the ScrollViewer to handle the touch events. See these related questions:

ScrollViewer and handling manipulation events on child elements

How to allow manipulations within ListView/GridView Item controls while allowing scroll and cross-slide manipulations on the ListView/GridView?

Community
  • 1
  • 1
Filip Skakun
  • 31,624
  • 6
  • 74
  • 100
  • Didn't know about the manipulation modes and what they do. This was exactly what I needed. Thank you! – Puhek Jan 24 '13 at 09:25