Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8059909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:49:07+00:00 2026-06-05T09:49:07+00:00

I have a listview and each Item has a CheckBox control as part of

  • 0

I have a listview and each Item has a CheckBox control as part of its ItemTemplate.

<ListView x:Name="taskListView" Grid.Row="2" BorderThickness="0" Margin="30,0,0,0" ItemsSource="{Binding ChildItems}">
        <ListView.ItemTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="25"/>
                        <ColumnDefinition Width="290"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <CheckBox Grid.Column="0" HorizontalAlignment="Center"></CheckBox>
                    <TextBlock Text="{Binding Name}" MaxWidth="270" Grid.Column="1" Margin="0,0,10,0"/>
                    <ComboBox SelectedItem="{Binding DependentTask, Mode=TwoWay}" 
                              Grid.Column="2"
                              Margin="0,3,0,3"
                              ItemsSource="{Binding DependentTasks, Converter={StaticResource addEmptyItemConverter}}" 
                              HorizontalAlignment="Left"
                              MinWidth="150"
                              DisplayMemberPath="ProjectionTaskLink.Name"/>
                </Grid>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

There is a parent to this ListView that has a checkbox as well. When that parent checkbox is checked, I want to check all the checkboxes in the ListViewItems. How can I get a hold of those in Codebehind so i can set them to Checked or Unchecked depending on the parent condition?

Thanks.

EDIT: Here is the full XAML:

<Grid Margin="0,10,0,0">
    <Grid.RowDefinitions>
        <RowDefinition Height="25"/>
        <RowDefinition Height="20"/>
        <RowDefinition Height="*"/>
    </Grid.RowDefinitions>
    <Grid Grid.Row="0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="25"/>
            <ColumnDefinition Width="400"/>
            <ColumnDefinition Width="35"/>
            <ColumnDefinition Width="35"/>
        </Grid.ColumnDefinitions>
        <CheckBox HorizontalAlignment="Center" Grid.Column="0" Checked="CheckBox_Checked"/>
        <TextBlock Text="{Binding Name}" Grid.Column="1"/>
        <TextBlock Text="Loops " Grid.Column="2" TextAlignment="Center"/>
        <TextBox Text="{Binding Scenarios}" Grid.Column="3"/>
    </Grid>
    <TextBlock Visibility="{Binding ContainsProjectionTasks, Converter={StaticResource boolToVisibilityConverter}}" 
                   HorizontalAlignment="Left" 
                   Width="450" 
                   TextAlignment="Right" 
                   VerticalAlignment="Bottom" 
                   Grid.Row="1" 
                   Text="Task Dependencies" 
                   Background="White"/>
    <ListView x:Name="taskListView" Grid.Row="2" BorderThickness="0" Margin="30,0,0,0" ItemsSource="{Binding ChildItems}">
        <ListView.ItemTemplate>
            <DataTemplate>
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="25"/>
                        <ColumnDefinition Width="290"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <CheckBox Grid.Column="0" HorizontalAlignment="Center"></CheckBox>
                    <TextBlock Text="{Binding Name}" MaxWidth="270" Grid.Column="1" Margin="0,0,10,0"/>
                    <ComboBox SelectedItem="{Binding DependentTask, Mode=TwoWay}" 
                              Grid.Column="2"
                              Margin="0,3,0,3"
                              ItemsSource="{Binding DependentTasks, Converter={StaticResource addEmptyItemConverter}}" 
                              HorizontalAlignment="Left"
                              MinWidth="150"
                              DisplayMemberPath="ProjectionTaskLink.Name"/>
                </Grid>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
</Grid>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T09:49:09+00:00Added an answer on June 5, 2026 at 9:49 am

    I ended up just changing the ListView ItemsSource collection in the setter of the IsChecked property of the parent check box, in my ViewModel. This eliminated any need for codebehind. Coupled with the NotifyPropertyChanged, it works now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListView where each item has a checkbox. Initially there are no
I have a listview and each item has a title, some info, and a
I have a listView, where each row has a button in the row layout.
I have a ListView in which each item has a SeekBar. When I update
I have a ListView in which each item has a complex layout that contains,
I have created listview using layoutinflator. Listview contains checkbox and textview for each row.
i have this listview each listview item has a textview that have background ,
I have a listview with a custom adapter. Each listview item has an ImageView.
I have a listview with several items that are created dynamically, each has two
I have a ListView with some items. I have toggleButton in each row of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.