I have listbox which contains one textblock and another checkbox. In xaml file it looks something like this:
<ListBox x:Name="notificationSettingsListBox" Grid.Row="1" Margin="20,20,20,20" Background="#e79e38" SelectionChanged="notificationSettingsListBox_SelectionChanged" Tap="notificationSettingsListBox_Tap">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Background="#055cc3" Width="500" Height="200" Margin="30,40,30,20">
<StackPanel Orientation="Vertical">
<TextBlock Text="{Binding channel_name}" Foreground="White" FontSize="31" TextAlignment="Left" TextWrapping="Wrap" Margin="0,20,10,0" />
<CheckBox Name="pushNotiOnCheckBox" Content="Enable Notification" IsChecked="false" Foreground="White" Background="White" BorderBrush="White" Checked="pushNotiOnCheckBox_Checked" Unchecked="pushNotiOnCheckBox_Unchecked"/>
</StackPanel>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Now whenever user checks any checkbox i need the index of the checkbox. How can i achieve that in windows phone??
Aucun commentaire:
Enregistrer un commentaire