WPF基于Curser移动内容 [英] WPF Move content based on Curser
问题描述
我希望我所有的窗口都具有以下效果,不太确定你们中有多少人玩过《命运》,但是当您移动光标时,UI会四处移动并稍微偏移.
我想对Windows应用程序产生这种影响,但不太确定如何去做.很明显,我只会有一个基于鼠标位置移动的主容器,但是我会将EventListener放在每个代码隐藏窗口中吗?
或者在其他地方重用代码,并且由于在每个像素上运行代码并移动控件而不会在内存上占用过多资源,或者我可以通过在两点之间而不是每个像素之间划一条线来使其变得平滑动画.
我需要一些建议,但在线上没有太多有关此的信息.
3D建模器
I want all of my windows to have the following effect, not too sure how many of you have played Destiny, but when you move the cursor around, the UI gets moved around and offset slightly.
I want to have this sort of effect on my Windows Application, but not too sure how I would go about doing it. I would clearly just have one main container which is moved based on the mouse location, but would I put the EventListener in each window code-behind?
Or somewhere else to reuse the code, and would this not be intensive on the memory due to running code for each pixel and moving a control, or could I make it make a smooth animation by making a line between two points instead of every pixel.
I would like some advice, not much information online about this.
3D Modeller
推荐答案
我还没玩过命运.
鼠标的一种想法是在ui上移动鼠标,以便您可以单击东西.
I've not played destiny.
Kind of the idea of the mouse is to move it across ui so you can click stuff.
您如何启动此过程及其作用?
How do you initiate this process and what's it do?
用命运"以外的术语来表达.
In terms other than go play Destiny.
这篇关于WPF基于Curser移动内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!