开发者

WrapPanel Content Alignment

I have a toolkit:WrapPanel showing in my WP7 app, I have 5 items and the first row only has enough space for 3 items, I would like the wrap panel to place 3 items on the first row, followed by the 2 on the second row being centered.

At the moment it looks like this

* * *
* *

but I wa开发者_JAVA百科nt the panel to do this

* * *
 * *

Do I have to implement my own panel or are there changes to the toolkit WrapPanel i can make?

Can there even be an option of how many item I would like on a particular row?


You could just use the standard WrapPanel but size the container to allow space for 5 items and insert a blank placeholder (of the same width as the actual content) after each real element you add.

This will create the offsetting you're after much like the spaces prepresent a placeholder and the asterisks represent actual content in your example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜