Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
589 views
in Technique[技术] by (71.8m points)

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

Specifically, I have a custom user control that receives manipulation events to scroll a custom DirectX control. This control, and others like it, are items in a GridView. I want the GridView to be able to scroll horizontally through the default TranslateRailsX manipulation, while the controls should be able to receive TranslateRailsY manipulation events.

In my experiments so far, by setting the controls' manipulation mode to System, I can get the GridView scroll to work, but the controls will not receive any manipulation events. By setting the controls' manipulation mode to All, or TranslateY, or TranslateRailsY, I can get my custom control to receive the manipulation events, but the GridView touch scroll will not work.

How can I allow BOTH of these manipulations?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can set two values for ManipulationMode in xaml. It will hopefully handle it.

ManipulationMode="TranslateX,System"

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...