I have a custom control that inherits from the TreeView control. Here's the code I have right now:
this.AddHandler(TreeViewItem.LoadedEvent, new RoutedEventHandler(ItemLoaded));
protected void ItemLoaded(object sender, RoutedEventArgs e)
TreeViewItem item = e.OriginalSource as TreeViewItem;
Unfortunately my handler seems to be handling the TreeView loaded event instead of the TreeViewItem loaded event. The original source is always the TreeView.
What is going wrong?
View Complete Post