Pretty simple (note: Silverlight)

                                <ItemsPanelTemplate x:Key="ItemsPanelTemplate1">
                                                <toolkit:WrapPanel/>
                                </ItemsPanelTemplate>
...
                                <ListBox DataContext="{Binding}"
ItemTemplate="{StaticResource ItemTemplate}"
ItemsSource="{Binding Collection}"
ItemsPanel="{StaticResource ItemsPanelTemplate1}"
/>


From: [email protected] [mailto:[email protected]] On 
Behalf Of Greg Keogh
Sent: Saturday, 16 June 2012 2:50 PM
To: 'ozWPF'
Subject: RE: Address Cards style display

Would you consider using a ListBox, and just swapping between two ItemsPanel 
templates? One a StackPanel (the default) and one a WrapPanel? I've just never 
done that at runtime...

I'd prefer to use a real grid for the details view, as it has fancy features 
like selected row template, column clicking, etc.

However, you've reminded me that the ListBox probably can be re-templated to 
use a WrapPanel is its container and the items can be converted into things 
that looks like address labels. I think a lot of people forget that you can 
completely subvert familiar WPF controls and turn them into other weird 
appearances.

I guess a starting point would be to extract the template of the standard 
ListBox and see how it works and how I can change it (and break it).

I just have to find an example of someone who's done something like you 
describe with a ListBox and its items, then I can coax it over to what I want. 
Any samples you've seen? I'll go looking now.

Greg

_______________________________________________
ozwpf mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozwpf

Reply via email to