【发布时间】:2011-10-06 09:39:15
【问题描述】:
所以我开始使用 XAML 在 Visual Studio 中创建 WPF 应用程序,而且似乎很多控件都不同。同名,但不同。
最值得注意的是(对我而言)是 Treeview 和 RichTextBox。
由于我在 WPF 中工作,我应该使用 System.Windows.Forms.TreeView 还是 System.Windows.Controls.TreeView(对于富文本框等)?
我不喜欢System.Windows.Controls 中的控件的工作方式。可能是因为我习惯了 Forms 中的它们,但例如,我不明白为什么 Controls.RichTextBox 没有 Text 或 Clear 方法。
同时,不得不大量使用 Sys.Windows.Controls 版本的东西。
一种方式比另一种更好吗?还是只是偏好?
【问题讨论】:
标签: wpf winforms forms xaml controls