Content alignment for Gridviewcolumn in the listview
Posted
by
Pankaj Upadhyay
on Stack Overflow
See other posts from Stack Overflow
or by Pankaj Upadhyay
Published on 2011-02-03T06:50:50Z
Indexed on
2011/02/03
7:25 UTC
Read the original article
Hit count: 205
Please see the picture below
Following is the code for this ::
<Grid>
<ListView Style="{StaticResource listViewStyle}" Name="transactionListView" HorizontalAlignment="Stretch" VerticalAlignment="Top" ItemsSource="{Binding}" MouseDoubleClick="transactionListView_MouseDoubleClick" IsSynchronizedWithCurrentItem="True" >
<ListView.View>
<GridView ColumnHeaderContainerStyle="{StaticResource gridViewHeaderColumnStyle}">
<GridView.Columns>
<GridViewColumn Width="70" Header="Serial" DisplayMemberBinding="{Binding Path=Serial}" />
<GridViewColumn Width="100" Header="Date" DisplayMemberBinding="{Binding Path=Date, StringFormat={}{0:dd-MM-yyyy}}" />
<GridViewColumn Width="200" Header="Seller" DisplayMemberBinding="{Binding Path=Seller}" />
<GridViewColumn Width="200" Header="Buyer" DisplayMemberBinding="{Binding Path=Buyer}" />
<GridViewColumn Width="70" Header="Bales" DisplayMemberBinding="{Binding Path=Bales}" />
</GridView.Columns>
</GridView>
</ListView.View>
</ListView>
</Grid>
© Stack Overflow or respective owner