Reputation: 957
How to show headers in rows instead of columns and bind the data.So that all the binded values will increase number of columns instead of number of rows.
ListView.View is set as GridView.
Please help.
Thanks,
Upvotes: 3
Views: 2230
Reputation: 15823
I can't come up with something complex, but you can try this simple hack: rotate grid's header and cell's content. Who knows, maybe this is what you are looking for :).
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<ListView>
<ListView.LayoutTransform>
<RotateTransform Angle="-90"/>
</ListView.LayoutTransform>
<ListView.View>
<GridView>
<GridViewColumn Header="First">
<GridViewColumn.CellTemplate>
<DataTemplate>
<ContentPresenter Content="{Binding}">
<ContentPresenter.LayoutTransform>
<RotateTransform Angle="90"/>
</ContentPresenter.LayoutTransform>
</ContentPresenter>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
<TextBlock Text="Some Data"/>
<TextBlock Text="More Data"/>
</ListView>
</Grid>
</Page>
Upvotes: 1