边界限制问题取决于ScatterViewItem和ScatterView的大小 [英] boundary limitation problem depends on the size of ScatterViewItem and ScatterView

查看:101
本文介绍了边界限制问题取决于ScatterViewItem和ScatterView的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力解决ScatterView上的边界问题。

I'm struggling with a boundary problem on ScatterView.

我制作了一个全屏散点图,其中包含图像和电影的模板,这些模板也是全屏并且运行良好。

I made a fullscreen scatterview with templates for images and movies which's also fullscreen and working well.

现在我想开启'CanScale'和'CanMove'选项,但有一些限制 - 我不想让scatterviewitem小于全屏和我也想让这个项目一直在全屏幕内。

Now I want to turn on the 'CanScale' and 'CanMove' option on with a couple of limitation - I don't want to make the scatterviewitem smaller than fullscreen and also I want to make the item inside of the fullscreen all the time.

当我移动一个大于屏幕的项目时问题是边界,所以我甚至无法进一步移动虽然必须有更多的图像。

The problem is the is a boundary when I move an item which is bigger than the screen so I cannot move further even though there must be more image.

我制作了一个示例应用程序,测试它非常简单。

I made a sample application which is very simple to test it.

1。我设置了相同大小的scatterview和scatterviewitem,移动项目没有问题。 

1. I set the same size of the scatterview and scatterviewitem and there was no problem moving the item. 

2。如果我将项目的大小设置为比散点图大2倍,那么

2. If I set the size of item 2 times bigger than the scatterview, 

如果项目仅在项目的角落处遇到"某个边界",则无法进一步移动。实际上是奇怪的一点) 正如你在图片上看到的那样,如果你向左移动项目,你可以在项目中间自由移动项目。
但是当你在项目的顶部或底部移动它时,你遇到了一个你不能再移动它的边界。

I cannot move any further if the item meet 'some boundary' only on the corner of the item.(That is strange point, actually)  As you see on the pictures, if you move the item on the left direction, you can freely move the item in the middle of the item. But when you move it on the top or bottom of the item, you met a boundary that you cannot move it anymore.

尝试完全左右移动项目在项目的中间,它可以正常工作。

Try moving the item fully left and right on the middle of the item, it works okay.

在项目的顶部或底部位置尝试,然后你不能将它移动到项目的末尾。

Try it on the top or bottom position of the item, then you cannot move it to the end of the item.

我检查了ContainerManipulationDelta和  ContainerManipulationCompleted事件但是当项目遇到边界时没有进行操纵事件,我试图将项目移动到最后。

I checked ContainerManipulationDelta and ContainerManipulationCompleted event but the manipulation events are not been made when the item meet boundary and I try to move the item to the end.

有没有人可以解释发生了什么以及如何解决它? ㅁ;

Is there anyone can explain what happens and how to solve it?;ㅁ;

推荐答案

我认为您应该检查ScatterView和scatterView Item的使用。在我看来,你应该重新考虑你的设计方法,并考虑如果你总是全屏操作,scatterview项目是否真的是最好的控制。在我的脑海中肯定不是

I think you should review the use of ScatterView and scatterView Item. In my mind you should reconsider your design approach and think if scatterview item is really the best control if you always operate full screen. In my mind definiltly not

一般来说,为了限制Scateerview项目的大小,你需要设置它的MinWidth和MinHeight值。然后你的散点图项永远不会低于这些值。

In general to limit the size of the Scateerview item you need to set it's MinWidth and MinHeight value. then your scatterview item will never be below those values.

对于边界,你应该trqck你项目的Center.X和Center.Y位置。

For bounding, you should trqck the Center.X and Center.Y position of your item.

如果你打算滑动内容,使用和大小全屏的项目大小可能是一个很好的方法

Using and ItemsContol sized to full screen might be a good approach if you intention is sliding content

希望它有所帮助

问候

serge


这篇关于边界限制问题取决于ScatterViewItem和ScatterView的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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