且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

WPF 是否使用本机 Windows 控件?

更新时间:2023-12-06 13:56:22

WPF 有点使用本机控件,因为 WPF 是在 Windows 中呈现控件的新本机方式 - 您认为本机是遗留的 win32,并且基本上在缓慢进行中历史.

WPF sort of uses native controls because WPF is the new native way to render controls in Windows - what you consider native is legacy win32, and basically slowly on the way to history.

MS 在 DirectX 中做了大量优化,以允许 WPF 高效地使用 GPU 进行渲染.这是一个新的原生"界面,也用于渲染 Vista 向上的 AERO 界面.WPF 直接进入原生层,然后在 GPU 中执行它可以执行的任何操作 - 包括文本渲染.

MS did a lot of optimization in DirectX to allow WPF efficiently to render using the GPU. This is a new "native" interface that is also used to render the Vista upward AERO interface. WPF goes directly to a native layer that then does whatever it can in the GPU - including text rendering.

现在,您问题中真正棘手的部分是Windows 以任何方式提供的本机 UI 组件"——好吧,这些低级功能是由 Windows 提供的,所以答案是肯定的.添加了新 API 中的原始绘图操作,但它们是专门为 WPF 添加的,现在被认为是一种新的本机 Windows 表示层".MS 正在慢慢地从 Win32 API 转向 WPF 以用于通用演示(Direct X 等仍然存在 - WPF 太通用了,无法用于例如高性能第一人称射击游戏).因此,鉴于 WPF 是新的本机组件层",这个问题真的很难回答 ;)

Now, the reall tricky part in your question is "native UI components provided by windows in ANY MEANS" - well, these low level functions are provided by Windows, so the answer is yes. Primitive drawing operations in a new API were added, but they were added specifically FOR WPF, which is now considered to be sort of the new "native windows presentation layer". MS is slowly moving away from the Win32 API towards WPF for generic presentations (Direct X etc. stays around - WPF is way too generic to be usable for example for high performance first person shooters). As such, given WPF is the new "native components layer", the question gets really tricky to answer ;)