[英]Difference between namespace Windows.UI.Xaml.Controls and Microsoft.UI.Xaml.Controls
I wish to learn how to build native WPF desktop app, by applying some modern UI (Like navigation view) from UWP.我希望通过应用 UWP 中的一些现代 UI(如导航视图)来学习如何构建原生 WPF 桌面应用程序。
However, I'm getting rather confused, with same class name, but different namespace但是,我很困惑,具有相同的 class 名称,但不同的命名空间
I was wondering, which is which, and which I should use in my WPF project?我想知道,哪个是哪个,我应该在我的 WPF 项目中使用哪个?
Thanks.谢谢。
Microsoft.UI.Xaml.Controls
is the namespace used in the WinUI library. Microsoft.UI.Xaml.Controls
是WinUI库中使用的命名空间。
Windows.UI.Xaml.Controls
is the namespace of the native controls that are included in Windows. Windows.UI.Xaml.Controls
是 Windows 中包含的本机控件的命名空间。
Microsoft is currently in the progress of breaking out the entire interface layer that contains the modern Windows controls and styles from the operating system into a separate WinUI 3 framework that will ship later this year.微软目前正在将包含现代 Windows 控件和 styles 的整个界面层从操作系统拆分为一个单独的 WinUI 3 框架,该框架将于今年晚些时候发布。
So to answer your question about which one to use, Microsoft.UI.Xaml.Controls
is the namespace to use going forward.因此,要回答您关于使用哪一个的问题, Microsoft.UI.Xaml.Controls
是今后要使用的命名空间。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.