When implementing the use of dependency properties, they usually determine the static type of the property with metadata, and then you create an accessible property using getter and setter, so if you want to create the readonly property, just create the visible property using getter only.
source share