3

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 want 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?

ColinE
  • 68,894
  • 15
  • 164
  • 232
Joseph Le Brech
  • 6,541
  • 11
  • 49
  • 84

1 Answers1

0

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.

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143
  • sounds like an ugly hack ... but ... the phone has a screen fixed width / height, so this approach isn't that bad. – ColinE Aug 11 '11 at 13:06