ItemsControl的的FlowLayout在WPF

编程入门 行业动态 更新时间:2024-10-28 17:15:06
本文介绍了ItemsControl的的FlowLayout在WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要一个非常简单的ItemsControl实际。我希望集合中的所有物品放在左到右,当它没有足够的空间,以适应下一个元素,它应该在下一行放。

I need a really simple ItemsControl actually. I want all the items in the collection to be put left to right and when it's not enough space to fit the next element, it should be put on the next line.

所以基本上就像在的FlowLayout的Java Swing,或在Windows正常的图标文件夹视图。

So basically like FlowLayout in Java Swing, or the normal Icon folder view in Windows.

我不能相信这不是内置的,但由于某种原因,我不能找到它。

I can't believe this is not built in, but for some reason I can't find it.

推荐答案

有一个看看这些:

的 msdn.microsoft/en-us/library/ms750564%28v=vs.85%29.aspx

具体的WrapPanel

Specifically the WrapPanel

编辑:

ItemsControl的控制有一个ItemsPanel属性,你CANSET使用WrapPanel:

The ItemsControl control has a ItemsPanel Property which you canset to use a WrapPanel:

的 msdn.microsoft/en-us/library/system.windows.controls.itemscontrol.itemspanel.aspx

更多推荐

ItemsControl的的FlowLayout在WPF

本文发布于:2023-11-12 03:04:48,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580327.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ItemsControl   FlowLayout   WPF

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!