Reputation: 11
Please help me on
Disabling listviewitem based on one of the column property.
Say, In a listview row if i checked some check box, then i have to disable that row.
Regards, Raman
Upvotes: 0
Views: 732
Reputation: 907
<ListView>
<ListView.ItemTemplate>
<DataTemplate >
<StackPanel Orientation="Horizontal">
<Label Content="{Binding}" IsEnabled="{Binding ElementName=ch,Path=IsChecked}"/>
<CheckBox Name="ch"/>
</StackPanel>
</DataTemplate>
</ListView.ItemTemplate>
<ListBoxItem Content="item 1"/>
<ListBoxItem Content="item 2"/>
</ListView>
Upvotes: 1