Showing posts with label SelectedItem. Show all posts
Showing posts with label SelectedItem. Show all posts

Thursday 18 April 2013

MVVM - Binding to TreeView.SelectedItem

At first, binding to the TreeView's SelectedItem property sounds like a simple task, but if you give it a go you will soon realise it's not so straight forward. That's because the WPF TreeView's SelectedItem property is read-only so we can't set the binding in XAML like normal.