ScatterView 问题 - 禁用后的组件
我目前正在开发一个简单的项目,其中包含一个包含许多项目的 ScatterView 和一个导航(实现了许多按钮)。
问题是我希望将 ScatterView 放在所有内容之上,以便用户可以根据需要在整个窗口上进行交互。
我尝试了不同的事情:
如果我将导航放在 ScatterView 的顶部,那么一旦有人将某些东西拖到导航中,那么在释放该项目后,它就会落在导航后面,并且您无法选择
如果我将导航放在 ScatterView 后面,那么我无法单击导航,因为 scatterView 消耗了所有事件。
如果我将导航放在 ScatterView 后面
您知道如何解决这个问题吗?
谢谢
I'm working currently on a simple project which consist of a ScatterView with a lot of items and then a Navigation (Implemented as many buttons).
The problem is that i will like to have the ScatterView on top of everything, so that users can interact on the whole window as they want.
I tried different things:
If I put the navigation on top of the ScatterView then as soon as someone draggs something into the navigation, then after releasing the item, it will fall down behind the navigation, and you are not able to pick it anymore.
If I put the navigation behind the ScatterView, then I cannot click the navigation since the scatterView consumes all events.
Do you have any idea how to solve this problem?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在分散视图上设置Background =“{x:Null}”,然后将其放在其他内容之上
set Background="{x:Null}" on the scatterview and then put it on top of your other stuff
我猜你正在使用 WPF 和 Surface。
如果这是真的的话
也许您可以将导航内容与您想要移动/缩放/旋转的其他项目一起放入 ScatterView 中,如果您不想移动导航,您可以禁用“CanMove”、“CanRotate”和“CanScale”并使用“Center”和“Orientation”为导航在散布视图中提供固定位置。
因此项目和导航将位于同一层。
I guess that you are using WPF and Surface.
If that's true,
maybe you can put the Navigation-Stuff inside the ScatterView, together with the other items that you want to move/scale/rotate, and if you do not want the navigation to be moved you can you disable "CanMove", "CanRotate" and "CanScale" and give the Navigation a fixed position in your scatterview with "Center" and "Orientation" .
So the items and the navigation will be on the same layer.