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 8559385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:01:48+00:00 2026-06-11T16:01:48+00:00

I am having a problem with my group-box. In the group-box i have a

  • 0

I am having a problem with my group-box. In the group-box i have a grid and in that i have about 20 check-boxes.
The problem is that i need to display value of all the checked check-boxes from the above into another group-box.

I am working in WPF C#.

Which is the event to trigger for the above?

And if the checked check-box is unchecked, the value displayed in 2nd group-box should disappear.

  • 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-11T16:01:49+00:00Added an answer on June 11, 2026 at 4:01 pm

    In Wpf you have a Checked Event, UnChecked Event and Indeterminate Event they all use the Generic RoutedEventHandler so you should be able to wire them up with a Common Event Handler, check the Senders Name or a Unique Indentifier in the Tag Property and use that to change your Value in the other GroupBox.

    Xaml

    <CheckBox Content="CheckBox" Checked="checkedChanged" Unchecked="checkedChanged" Indeterminate="checkedChanged" Height="16" HorizontalAlignment="Left" Margin="10,10,0,0" Name="checkBox1" VerticalAlignment="Top" Tag="1" />
    <CheckBox Content="CheckBox" Checked="checkedChanged" Unchecked="checkedChanged" Indeterminate="checkedChanged" Height="16" HorizontalAlignment="Left" Margin="10,36,0,0" Name="checkBox2" VerticalAlignment="Top" Tag="2" />
    

    Xaml.cs

    private void checkedChanged(object sender, RoutedEventArgs e)
    {
        CheckBox cb = (CheckBox)sender;
        int index;
        if (int.TryParse(cb.Tag.ToString(), out index))
        {
            if (cb.IsChecked == true)
            {
                switch (index)
                {
                    case 1:
                        break;
    
                    case 2:
                        break;
    
                    default:
                        break;
                }
            }
            else if (cb.IsChecked == false)
            {
                switch (index)
                {
                    case 1:
                        break;
    
                    case 2:
                        break;
    
                    default:
                        break;
                }
            }
            else
            {
                switch (index)
                {
                    case 1:
                        break;
    
                    case 2:
                        break;
    
                    default:
                        break;
                }
            }
        }
    }
    

    Example of what I mentioned in my Comments:

    Xaml

    <Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <GroupBox Grid.Column="0" BorderBrush="Black" BorderThickness="2">
                <Grid >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <CheckBox Grid.Column="0" Grid.Row="0" Content="CheckBox" Checked="checkedChanged" Unchecked="checkedChanged" Indeterminate="checkedChanged" Height="16" HorizontalAlignment="Stretch"   Name="checkBox1" VerticalAlignment="Top" Tag="0" />
                    <CheckBox Grid.Column="1" Grid.Row="0" Content="CheckBox" Checked="checkedChanged" Unchecked="checkedChanged" Indeterminate="checkedChanged" Height="16" HorizontalAlignment="Stretch"   Name="checkBox2" VerticalAlignment="Top" Tag="1" />
                    <CheckBox Grid.Column="0" Grid.Row="1" Content="CheckBox" Checked="checkedChanged" Unchecked="checkedChanged" Indeterminate="checkedChanged" Height="16" HorizontalAlignment="Stretch"   Name="checkBox3" VerticalAlignment="Top" Tag="2" />
                    <CheckBox Grid.Column="1" Grid.Row="1" Content="CheckBox" Checked="checkedChanged" Unchecked="checkedChanged" Indeterminate="checkedChanged" Height="16" HorizontalAlignment="Stretch"   Name="checkBox4" VerticalAlignment="Top" Tag="3" />
                </Grid>
            </GroupBox>
            <GroupBox Grid.Column="1" BorderBrush="Black" BorderThickness="2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*" />
                        <RowDefinition Height="*" />
                    </Grid.RowDefinitions>
                    <Label Grid.Column="0" Grid.Row="0" Content="" HorizontalAlignment="Stretch"   Name="label1" VerticalAlignment="Top" Tag="1" />
                    <Label Grid.Column="1" Grid.Row="0" Content="" HorizontalAlignment="Stretch"   Name="label2" VerticalAlignment="Top" Tag="2" />
                    <Label Grid.Column="0" Grid.Row="1" Content="" HorizontalAlignment="Stretch"   Name="label3" VerticalAlignment="Top" Tag="3" />
                    <Label Grid.Column="1" Grid.Row="1" Content="" HorizontalAlignment="Stretch"   Name="label4" VerticalAlignment="Top" Tag="4" />
                </Grid>
            </GroupBox>
        </Grid>
    </Window>
    

    Xaml.cs

    namespace WpfApplication1
    {
        /// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
        {
            Label[] myLabels = new Label[4];
    
            public MainWindow()
            {
                InitializeComponent();
    
                myLabels[0]=label1;
                myLabels[1]=label2;
                myLabels[2]=label3;
                myLabels[3]=label4;
    
            }
    
            private void checkedChanged(object sender, RoutedEventArgs e)
            {
                CheckBox cb = (CheckBox)sender;
                int index;
                if (int.TryParse(cb.Tag.ToString(), out index))
                {
                    if (cb.IsChecked == true)
                    {
                        myLabels[index].Content="Checked";
                    }
                    else if (cb.IsChecked == false)
                    {
                        myLabels[index].Content="UnChecked";
                    }
                    else
                    {
                        myLabels[index].Content="?";
                    }
                }
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been having issues with a custom check box control for a while
I have included my two code sources below. The problem that I am having
I am having a problem sorting results from joining tables that have to be
Im having problem in my UIscrollView ,this is what I have done: Whenever a
I am having problem to get a numerical value for this expression where I
I'm having problem with datagrid view. I have attached an image with the code
hello I am having problem related to https:// . I have used FB.getLoginStatus(function(response) function
I'm having some problem with group by and I did not able to overcome
I'm having a problem with LINQ. I have 2 tables (Parent-child relation) Table1: Events
I am having a problem with a radio button that is in a radio

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.