它是更好地使用WPF在Windows窗体? [英] Is it better to use WPF over Windows Forms?

查看:187
本文介绍了它是更好地使用WPF在Windows窗体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于一个全新的应用程序,是它更好地使用WPF在Windows窗体?我使用Windows窗体多WPF之前,但并非如此。据我所知,WPF是继承Windows窗体,对吧?

For a brand new application, is it better to use WPF over Windows Forms? I used Windows Forms before but not much WPF. As far as I know, WPF is the successor to Windows Forms, right?

应用程序将主办的DirectX的Windows(不是WPF 3D,但托管DirectX 和的 SlimDX )有很多的自定义控件

The application is going to host DirectX Windows (not WPF 3D, but Managed DirectX and SlimDX) with lots of custom controls.

编辑:应用程序在3D相关应用程序,编辑器,如 MODO

The application is a 3D related application, editor, such as modo:

推荐答案

----编辑2 -----

----EDIT 2 -----

假设你正在试图让像你显示一个编辑器,我建议你更要去WPF。我现在的项目有沿着这些线路的许多功能,以及,我们已经决定,能力复合WPF与Direct3D的内容是非常强大的。很高兴能够渲染场景做任何事 - 不只是一个长方形的窗口。在的WinForms,你pretty的多是限于一个矩形,你与空域出现,也有问题(细微的,但像闪烁的问题时,菜单拉过来的HWND,等)。 WPF的合成器与D3DImage摆脱所有这些问题,并让你使用你的想象力来构建一个非常灵活的用户界面。比如像上WPF3D对象的侧面渲染场景的实时是可能的,或者使用WPF直接控制你的D3D的场景,而不是试图做的GUI在D3D等之上。

Given that you're trying to make an editor like the one you showed, I'd recommend going WPF even more. My current project has many features along those lines, as well, and we've decided that the ability to composite WPF with Direct3D content is extremely powerful. It's nice to be able to render your scene into anything - not just a rectangular window. In WinForms, you pretty much were limited to one rectangle, and you had issues with airspace there, too (subtle, but things like flickering issues when menus pull over your hwnd, etc). The WPF compositor with D3DImage gets rid of all of those issues, and lets you use your imagination to construct a very flexible UI. Things like rendering your scene in realtime on the side of a WPF3D object are possible, or using WPF controls directly on top of your d3d scene instead of trying to do the GUI in D3D, etc.

-----原始---------

-----Original---------

如果你打算举办DX,你可能要考虑它 - 尤其是因为它可以让你做的场景构成与你的用户界面的能力,也没有空域问题,如果你使用的<一个href="http://msdn.microsoft.com/en-us/library/system.windows.interop.d3dimage.aspx">D3DImage.

If you're going to be hosting DX, you might want to consider it - especially since it gives you the ability to do scene composition with your UI and no airspace issues if you use D3DImage.

这确实与SlimDX和WPF的工作。

This does work with SlimDX and WPF.

----编辑-----

----EDIT-----

有关使用Direct3D的使用的WinForms的缺点的详细信息,以及WPF / DX整合的优势,请参见:

For more information on the disadvantages of using Direct3D with Winforms, and the advantages of WPF/DX integration, see:

空域 MSDN文章

$ C $的CProject arcticle就介绍到D3DImage

这篇关于它是更好地使用WPF在Windows窗体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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