locked
multiple column list view or other control that can show multiple columns and scrolls vertically?

    Question

  • Hi,

    I am using a list view on the snapped viewstate. I want a list view or control which can scroll vertically to show multiple items in one row.

    Like:

    A B C

    D E F

    G H I

    ...

    Is it possible?

    Thanks,

    Helin

    Monday, November 26, 2012 8:59 PM

Answers

  • I found a better way:

    <Style x:Key="GridViewUpDown" TargetType="GridView">
      <Setter Property="ItemsPanel">
        <Setter.Value>
          <ItemsPanelTemplate>
            <WrapGrid Orientation="Horizontal" />
          </ItemsPanelTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    
    Use this style for a gridview and it will become up&down

    • Marked as answer by Helin Wang Monday, December 3, 2012 9:20 PM
    Monday, December 3, 2012 9:19 PM

All replies

  • Yes. I think this is possible.

    But you need to change the data structure of the binding source.
    The data source should be same with one father item has three child items.

    Best regards,
    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, November 28, 2012 10:22 AM
  • I see. But this is not generic, say if I want it bind to a gridview and listview, but I still want to keep the original datastructure for gridview.

    What I imagined gridview & listview is a ItemsPresenter filled into ControlTemplate, and ItemsPresenter is assembled by system. I guess their is no way to change the ItemsPresenter?

    Wednesday, November 28, 2012 8:11 PM
  • I found a better way:

    <Style x:Key="GridViewUpDown" TargetType="GridView">
      <Setter Property="ItemsPanel">
        <Setter.Value>
          <ItemsPanelTemplate>
            <WrapGrid Orientation="Horizontal" />
          </ItemsPanelTemplate>
        </Setter.Value>
      </Setter>
    </Style>
    
    Use this style for a gridview and it will become up&down

    • Marked as answer by Helin Wang Monday, December 3, 2012 9:20 PM
    Monday, December 3, 2012 9:19 PM