在视口控件中显示2D位图图像 [英] Displaying a 2D bitmap image in a Viewport control

查看:133
本文介绍了在视口控件中显示2D位图图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在WPF中使用Viewport3D控件在C#Winform应用程序中播放3D图像.我还需要在后台显示2d位图图像.我的问题是-我可以在WPF的viewport3D控件中托管2D位图图像吗?有什么办法可以实现?

请帮忙.

问候,
Anshu Dutta

Hi,

I am using a Viewport3D control in WPF to diaplay a 3D image in a C# Winform application. I also need to diaplay a 2d Bitmap image behind the scene. My question is - Can I host a 2D bitmap image in a viewport3D control in WPF. Is there any way this can be achieved?

Please help.

Regards,
Anshu Dutta

推荐答案

据我所知,没有通用的方法可以向Viewport3D添加2D背景.不过,有一个简单的解决方法.

您可以使用普通的Image控件显示背景,然后将Viewport3D控件放置在图像上方.底层位图将在场景中的所有模型后面可见.
As far as I know there is no general way to add a 2D background to Viewport3D. There is a simple workaround though.

You can use an ordinary Image control to display the background and then place the Viewport3D control right over the image. The underlying bitmap will be visible behind all the models in the scene.


这篇关于在视口控件中显示2D位图图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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