垂直ListView显示

发布于 2024-10-03 07:45:04 字数 908 浏览 5 评论 0原文

我正在尝试创建一个列表视图,但在按照我想要的方式设计它时遇到了问题,我了解 Windows 演示基础 (WPF),但在学习 C# 和语言本身时,我从更困难的角度来解决它。

我认为 View.List 将是使用 OwnerDrawOnDraw 进行小修补的方法,但我似乎仍然遇到问题

我在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何止钟意 2024-10-10 07:45:04

我建议以下两件事之一:

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文