Has it ever been possible to bind to a field in WPF?
Someone suggested in another question that they, at some point, were able to bind a value to a field in WPF.
I know that this is not a supported scenario (and personally I have only seen bi开发者_运维问答nding work with properties), but is it even technically possible?
No. Binding in WPF uses either a PropertyDescriptor or the Dependency Property mechanism, which only works on Properties.
(Technical note here: A Dependency Property is technically sort of a field - it's defined as a field, then registered with the DP system, though, and treated more like a property, so I would still call it a property... The field itself doesn't actually store the data in the case of a DP.)
精彩评论