0

I want to display a list of items in a table like format. The format is fluid such that if a user resizes then more or less items will display on a row. I want to replicate how floated divs display within a container.

How do I do this in WPF?

So far I can get the items to display in a vertical format but cant figure out what to do next. P.s. for now I am hard coding the items whilst I debug, but I will bind it to a list at some point.

    <ListView>
        <ListViewItem Width="244">
            <local:ScheduledRecordingView />
        </ListViewItem>
        <ListViewItem Width="244">
            <local:ScheduledRecordingView />
        </ListViewItem>
    </ListView>
H.B.
  • 166,899
  • 29
  • 327
  • 400
Chris
  • 26,744
  • 48
  • 193
  • 345
  • GridView http://msdn.microsoft.com/en-us/library/system.windows.controls.gridview.aspx – paparazzo May 07 '13 at 14:20
  • 1
    possible duplicate of [WrapPanel as ItemPanel for ItemsControl](http://stackoverflow.com/questions/3131919/wrappanel-as-itempanel-for-itemscontrol) – N_A May 07 '13 at 14:27

1 Answers1

1

Surely been asked before, please search before asking.

Just make the ItemsPanel a WrapPanel. If you don't create a specific View (not necessary here) you should use a ListBox or if you don't need selection either an ItemsControl.

H.B.
  • 166,899
  • 29
  • 327
  • 400
  • 1
    I did search... but all the results came back for Grids so couldnt figure out what to search for - sometimes not knowing what to look for is the problem :) – Chris May 07 '13 at 15:03
  • @Chris: Well, that is true. – H.B. May 07 '13 at 15:15