Reputation: 3298
I'm building a wpf metro style application, but for the start, page I needed to create Windows 8 start screen like listbox in windows 7 and .NetFramework 4.0.
I used Listbox and Wrappanel now, but as you see it's not clear!!!
Please help me to fill the blank cell.
EDIT change place of buttons
Upvotes: 6
Views: 6541
Reputation: 2996
VariableSizeWrapGrid does the trick :
<GridView>
<GridView.ItemsPanel>
<ItemsPanelTemplate>
<VariableSizeWrapGrid ItemHeight="100" ItemWidth="150"/>
</ItemsPanelTemplate>
</GridView.ItemsPanel>
</GridView>
Example of result :
Upvotes: 1
Reputation: 331
this is not trivial at all... even microsoft guys told me that on a recent training I had..
I recommend following the following article which has something very close to what you need!
http://tozon.info/blog/post/2012/09/01/Variable-sized-grid-items-in-Windows-8-apps.aspx
Hope it helps!
Upvotes: 2
Reputation: 2492
Use a WrapPanel for layout and you're done:
<ListBox>
...
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Upvotes: 0
Reputation: 913
look at : http://www.codeproject.com/Articles/370650/Simple-Metro-Style-Panorama-Control-for-WPF by Sacha Barber
Upvotes: 4