When to use a WPF Dependency Property versus INotifyPropertyChanged
问题 Do folks have any guidance on when a simple .NET property that fires INotifyPropertyChanged.PropertyChanged is sufficient in a view model? Then when do you want to move up to a full blown dependency property? Or are the DPs intended primarily for views? 回答1: There are a few approaches: 1. The dependency property While you using the dependency property it makes the most sense in elements-classes that have a visual appearance ( UIElement s). Pros: WPF do the logic stuff for you Some mechanism