简体   繁体   English

命名空间 Windows.UI.Xaml.Controls 和 Microsoft.UI.Xaml.Controls 之间的区别

[英]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.ControlsWinUI库中使用的命名空间。

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.

相关问题 TabDroppedOutside 事件永远不会在使用 Microsoft.UI.Xaml.Controls 的 TabView 的 C# UWP 应用程序中触发 - TabDroppedOutside event never fires in C# UWP app using TabView using Microsoft.UI.Xaml.Controls WebView 类 (Windows.UI.Xaml.Controls) 在 WPF 中不支持 WebAuthn - WebView Class (Windows.UI.Xaml.Controls) does not support WebAuthn in WPF 系统 Windows 控件中的类 命名空间 VS Windows UI XAML 控件中的类 - Classes in System Windows controls Namespace VS Classes in Windows UI XAML controls Windows.UI.Xaml.Controls.SearchBox在哪里? - Where is Windows.UI.Xaml.Controls.SearchBox? 无法分配给属性“Windows.UI.Xaml.Controls.ContentControl.Content” - Failed to assign to property 'Windows.UI.Xaml.Controls.ContentControl.Content' 单元测试Windows 8 Store App UI(Xaml控件) - Unit Testing Windows 8 Store App UI (Xaml Controls) 无法将类型为“ Windows.UI.Xaml.Controls.ItemsControl”的对象转换为类型为“ Windows.UI.Xaml.Controls.Image”的对象 - Unable to cast object of type 'Windows.UI.Xaml.Controls.ItemsControl' to type 'Windows.UI.Xaml.Controls.Image' 无法分配给属性“ Windows.UI.Xaml.Controls.ContentPresenter.Content” - Failed to assign to property 'Windows.UI.Xaml.Controls.ContentPresenter.Content' 无法将字符串转换为Windows.UI.Xaml.Controls.IconElement - Unable to convert a string to Windows.UI.Xaml.Controls.IconElement 无法将类型为“ Windows.UI.Xaml.Controls.Grid”的对象转换为类型为“ Windows.UI.Xaml.Controls.ListView”的对象 - Unable to cast object of type 'Windows.UI.Xaml.Controls.Grid' to type 'Windows.UI.Xaml.Controls.ListView'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM