xamllistviewgridviewwindows-8semantic-zoom

ListView containing GridViews and ListViews


I have a requirement to create a xaml page with Semantic Zoom where the zoomed in view contains both GridViews and ListViews. I have started out with the basic Grid Application template.

In order to try to achieve this, I have made the Semantic Zoom control's zoomed in view show a list view, and the list view contains the ListView and GridView controls I need to actually show the data as ListViewItems. This works, up to a point - the issue is that the mouse-down or tap animations happen on the whole child control of the parent ListView instead of the child's elements. This sort of layout would be simple if I didn't need to support semantic zoom.

So, my question is is this the best way to achieve this sort of layout, or am I missing something. If this is the best way, is it possible to control the behaviour so that the child item elements have the correct animation effect on selection?

Additional Info

The choice of GridView or ListView is based on the type of the items in the collections. In this example, grp 1, 3 and 4 (to be shown in grids) are all collections of type NewsFull and the remainder (to show in Lists) are of type HeadlineOnly, both types inherit from NewsBase.

The page layout (zoomed in) should be something like this...

Title

grp 1         grp 2          grp 3            grp 4      grp 5
[g][g][g][g]  [_list item_]  [g][g][g][g][g]  [g][g][g]  [_list_item_]
[g][g][g][g]  [_list item_]  [g][g][g][g][g]  [g][g][g]  [_list_item_]
[g][g][g][g]  [_list item_]  [g][g][g][g]     [g][g]     [_list_item_]
[g][g][g]     [_list item_]  [g][g][g][g]     [g][g]                  

where [g] is a grid view item, and [_list_item_] is a list view item.

Zoomd out view is like this...

Title

grp 1      grp 2      grp 3      grp 4      grp 5
[summary]  [summary]  [summary]  [summary]  [summary]

Solution

  • Perhaps you can try using the ItemContainerStyleSelector to swap out the container of the items based on the item type or similar? This way, may be you can set one group to have a wrapping layout container and another can just be a stackpanel?