So i have ListView
with CheckBox
Column
:
<GridViewColumn Header="Name">
<GridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0,0,0,0">
<CheckBox Margin="0,0,0,0"/>
<TextBlock x:Name="textBlock"
Text="{Binding Name}"
Foreground="{Binding Path=Foreground, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type ListViewItem}}}"
Style="{StaticResource TextBlockDefaultStyle}"
Margin="0,2,0,0"/>
</StackPanel>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
My model have several properties
like Name
, Description
etc and my ListView
contains also simple Checkbox
.
My ListView
populated with several objects and i want to achieve 2 things:
-
In case i checks specific
CheckBox
i want all othersCheckBox
to becomeUncheck
(in case i have anotherCheckBox
in Checked state) -
How to determine the specific
checked
object
Aucun commentaire:
Enregistrer un commentaire