Multi-column silverlight repeater?
It's easy to repeat templated data, using List box, or StackPanel + ItemsControl, etc. However, I cant figure how to get multiple columns, ie, column alignment.
Example:
Name: John Doe
Street: 123 st
City: Seattle
State: WA
This link below shows the general layout I am trying to programmatically replicate (scroll near bottom): http://karlshifflett.wordpress.com/2008/10/23/wpf-silverlight-lob-form-layout-searching-for-a-better-solution/
Obviously, the data (and label) can vary in size. Also obvious, I could force a fixed width repeating a horizontal stackpanel, but that is lame.
In ASP.NET, you just use a repeater, and get results by repeating a table row + columns. Since an 开发者_运维问答HTML table respects/adjusts the column sizes for ALL rows, the data will simply line up. In silverlight, you... do what?
Note: a datagrid could do this... by why on earth would you want to use that for simple layout of a "form" like this example?
Is the entire pattern above repeating, meaning you have this block of options for each item? If so, why not just make your ItemTemplate a Grid with the left column fixed width? If not, can you elaborate more?
精彩评论