Is there a way to touch-enable scrolling in a WPF ScrollViewer?

后端 未结 2 1495
野性不改
野性不改 2020-12-24 01:02

I\'m trying to create a form in a WPF application that will allow the user to use iPhone-like gestures to scroll through the available fields. So, I\'ve put all my form cont

相关标签:
2条回答
  • 2020-12-24 01:28

    You should use the attached properties:

    • ScrollViewer.PanningMode
    • ScrollViewer.PanningDeceleration
    • ScrollViewer.PanningRatio

    The PanningMode defaults to None in the ScrollViewer default style, but setting it to another value will enable touch scrolling. I'm currently investigating using this feature in my app and am looking for a good deceleration and ratio value... I'll probably just have to test them out to find something that works well.

    0 讨论(0)
  • 2020-12-24 01:31

    If you are using .NET 4.0, there is a cool thing recently released by Microsoft team!! They ported all those nice Surface controls to Win7. SurfaceScrollViewer is really cool like iphone one. Install this toolkit and start a SurfaceWin7Touch project from VS2010 project template http://www.microsoft.com/en-us/download/details.aspx?id=26716

    0 讨论(0)
提交回复
热议问题