I am trying to create a new WPF control called NumericTextBox.
It inherits directly from TextBox.
I added a new DependecyProperty called NumericValue that it could be used to bind a numeric property.
Now, I would like to override the behavior of the TextProperty so that it could be accessed only as ReadOnly.
Is it possible redefine its behavior?
Not that i’m aware of, readonly DependencyProperties must be defined as such using the seperate DependencyProperty.RegisterReadOnly() method, you can not change a property to readonly after it’s been defined. You can only override the metadata: things like callbacks, default value.