垂直ListView显示
我正在尝试创建一个列表视图,但在按照我想要的方式设计它时遇到了问题,我了解 Windows 演示基础 (WPF),但在学习 C# 和语言本身时,我从更困难的角度来解决它。
我认为 View.List
将是使用 OwnerDraw
和 OnDraw
进行小修补的方法,但我似乎仍然遇到问题
我在 Youtube 浏览器中构建的内容和所需的布局如下所示:
---------------------------------------------
- ----- ----------------------------------- -
- | I | | Some Title here -
- ----- ----------------------------------- -
- ----- ----------------------------------- -
- | I | | Some Title here -
- ----- ----------------------------------- -
- ----- ----------------------------------- -
- | I | | Some Title here -
- ----- ----------------------------------- -
- ----------------------------------------- -
查看上面的布局,您可以看到我需要它,所以每行 1 行,这是我无法解决的主要问题,I
将是图像,右侧的文本将是。
任何人都可以帮我弄清楚我需要进行哪些设置或代码才能进行此排序,它确实阻碍了进度:(
谢谢
Im tryingh to create a list view but im having issues designing it how I want it, I know about Windows Presentation foundation (WPF) but as im studying C# and the language itself im tackling it from the more difficult prospective.
I would assume that View.List
would be the way to go with a small tinker with OwnerDraw
and OnDraw
but i still seem to be having issues
What im building in a Youtube Browser and the desired layout would be like so:
---------------------------------------------
- ----- ----------------------------------- -
- | I | | Some Title here -
- ----- ----------------------------------- -
- ----- ----------------------------------- -
- | I | | Some Title here -
- ----- ----------------------------------- -
- ----- ----------------------------------- -
- | I | | Some Title here -
- ----- ----------------------------------- -
- ----------------------------------------- -
Looking at the above layout you can see that I need that so there's 1 row per line, which is my main issue I cant get around, the I
would be an image, and the text to the right would.
Can anyone help me figure out what settings or code i would need to make to get this sorting, its really blocking progress :(
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议以下两件事之一:
1-使用 ListBox 并由所有者绘制该列表框
2-在详细信息视图中使用 ListView,然后所有者按照上面的描述绘制项目。
I would suggest one of two things
1- Use a ListBox and owner draw that
2- Use a ListView in Detail view and then owner draw the items as you describe above.