Where do I define dependency properties shared by the detail views in a master-detail MVVM WPF scena

Posted by absence on Stack Overflow See other posts from Stack Overflow or by absence
Published on 2010-05-23T11:56:02Z Indexed on 2010/05/23 12:00 UTC
Read the original article Hit count: 345

I can think of two ways to implement dependency properties that are shared between the detail views:

  1. Store them in the master view model and add data bindings to the detail view models when they are created, and bind to them in the detail view.
  2. Don't store them in the view models at all, and use FindAncestor to bind directly to properties of the master view instead.

What are the pros and cons of each, and are there other/better options?

© Stack Overflow or respective owner

Related posts about wpf

Related posts about databinding