我正在开发一个Windows Phone 8应用程序,其中我正在使用列表框中的复选框以及一些文本块。CheckBox Checked和Unchecked事件在Windows Phone 8应用程序中滚动列表框时触发事件?
<ListBox x:Name="lstStudentSelect" ItemContainerStyle="{StaticResource ListBoxItemStyle1}" Background="Transparent" ScrollViewer.VerticalScrollBarVisibility="Visible" Height="487" BorderThickness="0" VerticalAlignment="Top" Margin="8,198,10,0">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<StackPanel Width="360" Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock Text="{Binding stunum}" Width="80" Foreground="Black" TextWrapping="Wrap" FontSize="20" VerticalAlignment="Center" />
<TextBlock Text="{Binding name}" Width="280" Foreground="Black" TextWrapping="Wrap" FontSize="20" VerticalAlignment="Center" />
</StackPanel>
<StackPanel Width="5"></StackPanel>
<StackPanel Width="150" Orientation="Horizontal" HorizontalAlignment="Right">
<CheckBox IsChecked="{Binding ChkFlag, Mode=TwoWay}" BorderBrush="#203485" Foreground="Black" BorderThickness="1" Tag="{Binding cusnum}" Name="cusCheck" Checked="cusCheck_Checked_2" Unchecked="cusCheck_Unchecked_2" ></CheckBox>
<TextBlock Text=" " TextWrapping="Wrap" Foreground="Black" FontSize="20" VerticalAlignment="Center" />
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
当我检查/上的复选框选中复选框事件触发选择
,当我取消/取消选择复选框取消选中复选框事件触发。
但现在我的问题是:
当我滚动复选框选中列表框和unchecked事件触发自动?
我该如何避免这种情况发生?