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

The Archive Base Latest Questions

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

I have A 3 Level TreeView which is using multibinding to generate for every

  • 0

I have A 3 Level TreeView which is using multibinding to generate for every instance of Class A
2 TreeViewItems as List of Class B . And every List contains Items lets say of Class C .

I can add Items of Class C for each List in my UI while the Lists(Class B) are collapsed .
I can even add Class C for each List(Class B) while the whole TreeViewItem(Class A) is collapsed .

My Problem is I need to be able to access all TreeViewItems even if they are collapsed.(for ex to select them).

I tried doing so but i encountered following problems :

1- All not visible TreeViewItems(of classes B and C) are not yet created as TreeViewItems.(how can i make them be?)

2- When u expand a Class B TreeViewIiem for the FIRST TIME u get to see all its Items(Class C) as TreeViewItems.(obviously trivial)

3- Collapsing after Expanding any Class B (there are only 2) in a specific Class A TreeViewItem will result in being able to add Class C instances as TreeViewItems even if the whole TreeViewItem(Class A) is collapsed .(As long as u stay in this Class A TreeViewItem)

4- If u change the selected Class A(i.e if u click on another TreeViewItem which has an ancestor of Class A different than the choosen one) all not visible TreeViewItems of previously choosen Class A are lost. and u can begin again by step 1 in the newly choose Class A.

So how can i be able to Select any TreeViewItem of Class C or B at any give moment?

Thank you

  • 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-24T20:20:29+00:00Added an answer on May 24, 2026 at 8:20 pm

    to 1) Depending on how many items you want to show in your tree view, you don’t want to create all TreeViewItems. What you are observing is called Virtualization. If you really don’t want this, and i strongly advise you not to do that, you can use VirtualizingStackPanel.IsVirtualizing="False" on your TreeView. If you don’t mind making your hands dirty, this might help aswell.

    Unfortunately i don’t understand your other points. First of all, tell us how you create your hierarchy of Data. I guess you could make everything work when using dynamic data and HierarchicalDataTemplate with proper bindings (for collapsing etc.).
    Because then it doesn’t matter what ui control is visible, only the data should be relevant.

    And for your last and actual question. If you use ItemsSource and HierarchicalDataTemplate, you can easyl traverse your data to find your Items and, for example, collapse to make all Class C visible.

    One problem though is, the selection of the TreeView control is a bit problematic. See this article for a way to solve it

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

Sidebar

Related Questions

I have a TreeView which has three levels. Lets say its a league, division
I have a treeview which binds to lots of nested ObservableCollections. Each level of
I have an node object which specifies the node level public class Node {
After you have added Items to the root level of a System.Windows.Controls.TreeView, what is
I'm using a treeview with three levels of nodes, the second level which I've
I have an ASP.NET website where i have implemented page level caching using the
I have a TreeView that is bound to a collection class that I have
I have a three level treeview. How do I select any item in third
I have a hierarchical TreeView object with some structure: Main level second level 1
I have a treeview with checkboxes for each item using a DataTemplate and 2

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.