在UI元素上进行透视转换? [英] PERSPECTIVE Transform on UI Elements?

查看:51
本文介绍了在UI元素上进行透视转换?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用标准UI元素(例如按钮或矩形)并获得透视图(即从侧面角度观看)的最佳方法是什么?我似乎无法使用标准属性来做到这一点.我已经看到了Viewport2DVisual3D命名空间,并在网上找到了一些示例,但是即使将它们放在视口中,它们也似乎扭曲了UI元素,即使是直视. IE.我希望平面2dVisual3d视口中的按钮看起来完全像普通按钮一样.字体不全乱七八糟.我们将不胜感激.

What is the best way to use standard UI elements like a button or rectangle and get a perspective view (i.e. viewing it from a side angle)? It doesn't seem like I can do that with standard properties. I have seen the Viewport2DVisual3D name space and found some samples on the net, but they all seem to distort the UI elements even in a head on view, just by putting it in the viewport. I.e. I want a button in a flat 2dVisual3d viewport to look EXACTLY like a normal button looks. Not with the font all distorted and stuff. Any help would be appreciated.

推荐答案

WPF目前还不支持透视变换,您必须使用Viewport2DVisual3D来完成这样的变换.   Greg Schechter编写了一个基于WPF 3D构建的名为Planerator的库,该库使将透视图变换添加到控件中非常简单,可以在这里.
WPF doesn't support perspective transforms yet, you'll have to use Viewport2DVisual3D to accomplish transforms like that.  Greg Schechter wrote a library called Planerator built on WPF 3D that makes it pretty simple to add perspective transforms to your controls, check it out here.


这篇关于在UI元素上进行透视转换?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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