C# 菜单组件
我正在寻找正确方向的指针,而不是我的问题的完整解决方案。
下面是我想要为我的程序生成的用户界面类型的示例,取自 Microsoft Excel。
- 样式化的项目列表
- (悬停时不同)
- 可点击
- 能够向每行添加图标或图像
我会怎么做关于构建一个界面,我将从哪个界面组件开始,然后填充数据。
在针对 Windows Phone 7 进行开发时,我通常会使用“stackpanel”,而 Windows 窗体应用程序中的 C# 无法提供该功能。
I am looking for a pointer in the right direction, rather than a full solution to my question.
Below is an example of the kind of user interface, taken from Microsoft Excel, that I'm wanting to produce for my program.
- A list of items
- Styled (Different when hovering)
- Clickable
- Able to add an icon or image to each row
How would I go about building an interface, which unser interface component would I start with, and then populate with data.
When developing for windows phone 7, I would usually use a 'stackpanel', which isn't available from C# in a windows form application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 WPF,这会比使用 WinForms 更容易 - 它也与使用的 Silverlight 非常相似对于 WP7,这样您就可以重用您的经验(它有 StackPanel,等等 :))。
对于 Win Forms,您想要的东西会非常困难,但实际上对于 WPF 来说非常简单 - 它只是一个样式化的 ListBox,带有非常简单的 DataTemplate - 您可以在任何书籍或教程的前几章之后执行此操作。
这应该可以帮助您入门。
This will be much easier if you use WPF than with WinForms - it is also quite similar to Silverlight used for WP7, so you could reuse your experience (it has StackPanel, among othe things :) ).
What you want would be very hard with Win Forms, but actually very simple with WPF - it is just a styled ListBox, with very simple DataTemplate - something you can do after first few chapters of any book or tutorial.
This should get you started.