TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ray Beattie
NA
4
1.3k
ListBox.ItemTemplate Can I tell if a checkbox is checked.
Jul 16 2014 4:51 PM
Here is the ListBox.ItemTemplate:
<!-- This is the listbox-->
<ListBox Name="lbTodoList" Grid.Row="3" Background="AliceBlue" HorizontalContentAlignment="Stretch" SelectionChanged="lbTodoList_SelectionChanged" KeyDown="lbTodoList_KeyDown">
<ListBox.ItemTemplate>
<DataTemplate>
<Grid Margin="1,2,2,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<CheckBox x:Name="chkBox" FontWeight="Bold" Content="{Binding TrackRace}" Checked="chkBox_Checked"/>
<TextBlock Grid.Column="1" FontWeight="Bold" HorizontalAlignment="Right" Text="{Binding RaceTime}"
/>
<TextBlock Grid.Row="1" Text="{Binding RaceDist}"/>
<TextBlock Grid.Row="1" Grid.Column="1" HorizontalAlignment="Right" Text="{Binding RaceClass}"/>
</Grid>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
All items load ok and I can get the items out when item in listbox is selected. I just do not know how to tell if the checkbox is checked or how to make it check. I hope someone can help. If you need more info on this let me know.
Thanks In Advance:
Ray
[email protected]
Reply
Answers (
3
)
animation in WPF
EXE file