views:

498

answers:

1

The .NET Framework seems to have two implementations of the DependencyProperty object

  1. System.Windows.DependencyProperty
  2. System.Workflow.ComponentModel.DependencyProperty

I understand that the normal use of the first one is in WPF and the normal use of the second one is in WF but what are the differences between them if any?
If I was not using WPF/WF and still wanted to use a DependencyProperty which would be best to use?
Any plans to merge to one in the future?

+2  A: 

The difference is subtle but it's quite clear enough:

System.Windows.DependencyProperty is focused toward handling dependency property of any WPF dependency object, and you can register it with optional additional information about the metadata of the property, such as measures, animatable, and many WPF specific.

WHy? Because this dependency property can then be further specified using derived classes of PropertyMetadata. This includes WPF's UIPropertyMetadata and FrameworkPropertyMetadata for advanced registration of WPF dependency property.

System.Workflow.ComponentModel.DependencyProperty can only register as a simple dependency property, without needing additional information of specific WF's PropertyMetadata.

At present, there's no plan to integrate them, since both of them are conceptually and contextually different.

eriawan
thanks, you'd think because they are different they would be named differently to prevent conflicts at the very least
Robert MacLean