Data binding to SelectedItem in a WPF Treeview
I realise this has already had an answer accepted, but I put this together to solve the problem. It uses a similar idea to Delta’s solution, but without the need to subclass the TreeView: public class BindableSelectedItemBehavior : Behavior<TreeView> { #region SelectedItem Property public object SelectedItem { get { return (object)GetValue(SelectedItemProperty); } set { SetValue(SelectedItemProperty, … Read more