Quantcast
Channel: problem with Treeview Item
Viewing all articles
Browse latest Browse all 4

problem with Treeview Item

$
0
0

I am using a Treeview in that in place of treeview items i have inserted object of another class which are derived from the TreeviewItem class.

 

The UI looks fine but the problem is with the handling of the expanded and selected events

 

for expanded events the sender can be type casted into the derived class. but for the treenode selected event the sender can only be type casted to treeview item not to the derived class object

can any one help

 

 

 

void

folders_SelectedItemChanged(object sender, RoutedEventArgs e)

{

this.selectedItem = sender asFLSObjectTreeItem;

}

 

void

folder_Expanded(object sender, RoutedEventArgs e)

{

this.selectedItem = sender asFLSObjectTreeItem;

}

 

 

the first doesnot work and selecteditem is given as null.

while the second one gives the object of the derived class


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images