Menú GridView en WinRT

I'm trying to create a horizontal scrolling menu in WinRT and I would like to know, how can I achieve a smilar effect as for example Minesweeper game menu (found in Windows Store). I know it could be done somehow with TemplateSelector, but for example in Minesweeper, the first group in the GridView is just selection of New game (no data needed to bind to it), so I would have to give GridView some kind of "dummy" items, which would not be very elegant. Do you have some suggestion of how to achieve the result I need?

preguntado el 28 de agosto de 12 a las 10:08

1 Respuestas

I do not see the Minesweeper game in the store, but I'm assuming you are wanting to accomplish something like is seen in the people hub when viewing people's details. Or when searching for music in the music app. There is a GridView, but there is also other items in the front. The easiest way to accomplish this is to have a ScrollViewer wrap the GridView and any other controls you want to render. You would then disable to scrollviewer for the GridView

    <ScrollViewer VerticalScrollMode="Disabled" HorizontalScrollMode="Auto">
        <StackPanel Orientation="Horizontal">
            <!-- First content here -->

            <GridView ScrollViewer.HorizontalScrollMode="Disabled" />
        </StackPanel >
    </ScrollViewer>

Respondido 29 ago 12, 23:08

I have tried this, but this way I lose the possibility to create a semantic zoom with all "menu groups", is there a alternative? - Martín Zikmund

This is true, but maybe semantic zoom is not the best approach? I just noticed that the search functionality in the Music app (for RTM) changed from a GridView and went a new direction. I like this new way of displaying better than the GridView because of what you said - shawn kendrot

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.