数据模板触发事件问题!
下面是我的数据模板,模板中有一个CheckBox,我想要这样一个效果,选中行的时候CheckBox就被选中或反选,请问要怎么实现!
<DataTemplate x:Key="movieItemTemplate" > <Grid Margin="{StaticResource PhoneTouchTargetOverhang}" MouseLeftButtonUp="Grid_MouseLeftButtonUp"> <Grid.RowDefinitions> <RowDefinition Height="40"/> <RowDefinition Height="40"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="80"/> <ColumnDefinition Width="*"/> <ColumnDefinition Width="80"/> </Grid.ColumnDefinitions> <Image Grid.Row="0" Grid.RowSpan="2" Source="/LongListSelector;component/head.jpg" /> <TextBlock x:Name="name" Text="{Binding Name}" Grid.Column="1" Grid.Row="0" Margin="15,0,0,0" /> <TextBlock x:Name="phone" Text="{Binding Phone}" Grid.Column="1" Grid.Row="1" Margin="15,0,0,0"/> <CheckBox Grid.Row="0" Grid.Column="2" Grid.RowSpan="2"/> </Grid> </DataTemplate>