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