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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:31:24+00:00 2026-05-20T07:31:24+00:00

I have a simple treeview. The itemtemplate has a check box. When the checkbox

  • 0

I have a simple treeview. The itemtemplate has a check box. When the checkbox is clicked, my model updated all children to reflect the same checked state as the parent. This works in code but is not reflected on the tree. I’ve even added a ton of callbakcs, property change notifications, etc.

public class OutlookFolder : INotifyPropertyChanged
    {
        public delegate void CollectionChangedDelegate();
        public static CollectionChangedDelegate CollectionChanged;

        public string Name { get; set; }
        public string ID { get; set; }
        private bool _checked;
        public bool Checked 
        {
            get { return _checked; }
            set { _checked = value; UpdateChildren(value); }
        }

        private ObservableCollection<OutlookFolder> _Children;
        public ObservableCollection<OutlookFolder> Children
        {
            get { return _Children; }
            set { _Children = value; OnPropertyChanged("Children"); }
        }

        private void UpdateChildren(bool value)
        {
            if (Children == null) { return; }

            foreach (OutlookFolder f in Children)
            {
                f.Checked = value;
            }

            if (CollectionChanged != null)
            {
                CollectionChanged.Invoke();
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;

        private void OnPropertyChanged(string name)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs(name));
            }
        }
    }

As you can see I even added a delegate that I call after updating the children list which causes the viewmodel to also call OnPropertyChange()

  • 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-05-20T07:31:25+00:00Added an answer on May 20, 2026 at 7:31 am

    Does your OutlookFolder object implement PropertyChanged when you change Checked? Collectionchanged doesn’t update individual items only the treeview.

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

Sidebar

Related Questions

I have a simple gtk.TreeView with a gtk.ListStore model and set_reorderable(True) , I want
I'm all new to this treeview business. I have a fixed treeview, very simple
I have simple issue setting a two-way databinding of a checkbox in Silverlight 3.0.
I like Microsoft's Windows Forms tree-view object model. It has the tree, nodes, children
I have a HierarchicalDataTemplate which has some simple Items contained in a horizontal StackPanel.
I have simple regex \.*\ for me its says select everything between and ,
I have simple win service, that executes few tasks periodically. How should I pass
i have simple regular expression: ^123$ Matches are for example 123 1234 etc. How
I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input
I have simple SSIS package which reads data from flat file and insert into

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.