Click here to Skip to main content
15,878,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
.I am using Treeview1 and Treeview 2.Passing data from one treeview to another.I am new to WPF and learning data binding. During run time I have to create a treeview by adding using button "New" only to add Header and then another button"Add" to add related items all during runtime.I need help and guidance how to approach.

What I have tried:

I tried creating list of objects for treeview header and add after creating objects and even creating instance for treeview item and then using forloop.Though it meets I have issues.Hence not sure , if this approach is correct..
Posted
Comments
Graeme_Grant 9-Apr-22 4:11am    
We can not see your screen and your code. We are also not here to write your code for you.

If you are not familiar with data bainding, then pick a simpler example, like managing a list to learn. Once you understand how it works, then you are ready to tackle the task. Use google search, there are plenty of how-to WPF tutorials on WPF Data Binding.

With WPF and data binding, you're doing data-first and the UI is a reflection of the data. In other words, the UI will reflect the data binding changes automatically.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900