本文介绍了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.

推荐答案

有一个看看这些:

具体的WrapPanel

Specifically the WrapPanel

编辑:

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

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

这篇关于ItemsControl的的FlowLayout在WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 08:56