Any example of Dependency Property in ViewModel?
问题 Can someone give example of Dependency Property in ViewModel in WPF passed as datacontext to view. Will this require inheriting from DependencyObject? Lets say I want ListBox SelectedItem bound to a Dependency Property CurrentItem in ViewModel. I have it working from window object but same thing don't work with ViewModel . In ViewModel I use GetProperty and SetProperty and not CLR property. public partial class Window1 : Window { ObservableCollection<Person> persons; public