简单的WPF Viewport3D问题 [英] Simple WPF Viewport3D question

查看:496
本文介绍了简单的WPF Viewport3D问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

如果我在WPF中有Viewport3D,它是否可以具有透明背景?那么说我将viewport3D覆盖在窗口内容之上,并在中间仅渲染一个小立方体,它后面的所有内容都可见吗?到目前为止,我的所有实验背景都是白色!

Hi All,

If I have a Viewport3D in WPF is it possible for it to have a transparent background? So say I overlay the viewport3D on top of my window content and render only a small cube in the middle, everything behind it to be visible? With all my experiments so far the background is white!

Thanks in advance!

推荐答案

是的,可以,只需将所有相关背景(您的3D视口和窗口)设置为Transparent ,并确保窗口具有这些背景属性集:
Yeah you can, just set all relevant backgrounds (your 3D viewport, and the window) to Transparent and make sure the window has these properties set:
WindowStyle="None" AllowsTransparency="True"



希望这会有所帮助,
弗雷德里克·博纳德(Fredrik Bornander)



Hope this helps,
Fredrik Bornander


这篇关于简单的WPF Viewport3D问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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