WPF TreeView - SelectedItem Two Way Binding

added by ButtonChrome
9/2/2011 9:13:19 AM

717 Views

Because the standard WPF TreeView implementation supports Virtualization it is unable to support two way bindings on its SelectedItem property as standard. This makes sense, because with Virtualization you may not have a container (TreeViewItem) available for any particular bound data item at the time you need it (to set its IsSelected property of the TreeViewItem to ‘True’).


1 comments

dpeterson
9/2/2011 9:13:10 AM
I've run across a similar problem with the WPF Listbox, thanks for sharing the workaround for Treeviews :-)