1
Answer

Treeview Control problem in WPF

Rama Makkena

Rama Makkena

15y
3.3k
1

Hi,

My problem is when i am trying to use the header value of existing treeviewitems.

Let me explain the situation.

1)I have a label .I want to give content to that lable.

2) I have treeview control with 1 parent and 3 childs.I am using context menu .

I am using this context menu for the above tree control. i have one menu item in the context menu.

3)So whenever i do mouserightclick on any node of treecontrol(without selecting node--simply mouserightclick on nodes) it will display menuitem of context menu.(selecting node also ok.but currently i am trying without selecting the node)

4)if i click the menuitem it will fire an event , in which i am assigning content to label

5) I want to assign the currentnode header value to label content

I am trying it through code.of course i don't know how it will be done in xaml also.

Still i am thinging whether it is possible or not?

If possible could anyone provide source code to overcome this probelm as soon as possible

Thanks in Advance

Rama Krishna Makkena

 

 

Answers (1)