Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我对 C#-form 应用程序开发有点陌生,我想知道,制作包含水平项目列表的控件的最佳方法是什么。其中每个项目都被水平统治到它的父控件,包含左侧的缩略图和图像右侧的大文本块以及其下方的较小文本块。所以基本上这不是我可以在工具箱中找到的预定义控件。有任何想法吗?
您可以使用表单控件中的 Panels 或 WPF 中的 WrapPanel 和 StackPanel 进行布局。
在 WindowsForms 中,我会创建一个用户控件来保存单个项目的正确布局,然后在运行时列出它们。
在 WPF 中,我将使用 List 控件,但将布局模板设置为使用 WrapPanels 和 StackPanels。
如果您不必与 winforms 共存,WPf 是长期更好的解决方案