Quantcast
Channel: control in ListView.GridViewColumn alignment - Stack Overflow
Viewing all articles
Browse latest Browse all 2

control in ListView.GridViewColumn alignment

$
0
0

I have following WPF ListView:

<ListView Grid.Column="2" Grid.Row="1" Margin="0,53,12,6"Name="lvwProperties"ItemsSource="{Binding Path=SelectedPropertyItems, Mode=TwoWay}"Grid.ColumnSpan="2"><ListView.View ><GridView><GridViewColumn Header="Property" DisplayMemberBinding="{Binding Path=PropertyName, Mode=TwoWay}" Width="130" /><GridViewColumn Header="Is Mandatory" Width="90"><GridViewColumn.CellTemplate><DataTemplate><CheckBox IsChecked="{Binding Path=IsMandatory, Mode=TwoWay}" HorizontalAlignment="Center" /></DataTemplate></GridViewColumn.CellTemplate></GridViewColumn></GridView></ListView.View></ListView>

I want to make the CheckBox aligned center in the 2nd GridColumn. Set the HorizontalAlignment="Center" seems doesn't do the trick. How to achive this in XAML???


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images