0

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?

4

1 回答 1

1

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>
于 2012-08-29T22:04:21.813 回答