How do you create a read-only dependency property? What are the best methods for doing this?
In particular, what strikes me more is that implementations
DependencyObject.GetValue()
which takes a System.Windows.DependencyPropertyKey
parameter as a parameter.
System.Windows.DependencyProperty.RegisterReadOnly
returns a D object of ependencyPropertyKey
, not a DependencyProperty
. So, how should you access the read-only dependency property if you cannot make any GetValue calls? Or should you somehow convert DependencyPropertyKey
to a plain old DependencyProperty
object?
Advice and / or code will be REALLY appreciated!
Giffyguy Jul 13 '09 at 23:08 2009-07-13 23:08
source share