缩放,滚动FlipView项目 [英] Zooming, scroll on a FlipView item

查看:90
本文介绍了缩放,滚动FlipView项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试使用包含多个项目的FlipView,您可以在其中缩放和滚动特定项目。 这可以通过设置overflow:scroll和-ms-content-zoom来实现:放大win-template类。花了
来确定FlipView图像的父节点是什么,但我找到了它。

Hello, I am attempting to work with a FlipView that contains several items where you can zoom and scroll on a particular item.  This can be achieved by setting overflow: scroll and -ms-content-zooming: zoom on the win-template class. It took some prodding to figure out what the parent node was for a FlipView image but I found it.

问题是,一旦你这样做,你就不能再滚动了因为"溢出:滚动"而转到下一个项目。 目前我正在调查这样做:

The problem is that once you do this, you no longer can scroll to the next item because of "overflow: scroll".  Currently I'm investigating doing this:


  1. 听取flipview上的pageselected。
  2. 为图像父级(win-template节点)添加onscroll侦听器。
  3. 刺激以查看用户是否水平滚动超过图像的结尾。 //这就是我目前正在做的事情。还没弄明白怎么做。
  4. 然后手动触发flipview的next()函数或删除"overflow:scroll"。从图像的父母的风格。不确定哪个更好。

 

我这样做的主要担心是体验可能变得滞后,因为onscroll在用户滚动时会不断发射。我的问题是:

My main concern with doing it this way is that the experience may become laggy, since onscroll is going to fire constantly while the user is scrolling. My question is:


  1. 是否有更好的(内置?)方法来实现我在这里尝试做的事情?
  2. 是否有更好的事件可以收听而不是onscroll? 也许是当滚动元素拖过末尾时触发的事件?

谢谢!

推荐答案

马修,

    我认为你看到嵌套控件中的不必要的问题需要使用相同的导航事件,最终只有一个有用。 你正在遇到一次性的情况,并且需要找出
在这种情况下适用于你的具体情况。 我自己,我将可滚动区域的内容放入一个比控制翻页视图页面的div更小的区域(比如1到10个像素),就像平板电脑上的挡板一样。 然后
你的手指(或鼠标)可以使用该区域来切换flipview的页面,而里面的区域可以缩放。 

     I think you see the inherant problems in nesting controls that need to use the same events for navigation and ultimately, only one works.  You're running into a one-off situation and are just going to need to figure out what works in this case for your specific scenario.  Myself, I would enclose the contents of the scrollable area into an area that is just smaller (think 1 to 10 pixels) than the div that controls the flipview page, like the bezel on a tablet.  Then you finger (or mouse) can use that area to switch the pages of the flipview, while the area inside can zoom. 

     ;如果您有任何其他问题,请与我们联系。

     Please let me know if you have any further questions.

 


这篇关于缩放,滚动FlipView项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆