Skip to content
Discussion options

You must be logged in to vote

There are several ways to model this behavior. We favor mirroring the property value in the child class and make the parent class responsible for notifying the children when the value changes (if needed). Usually, the list will include a method for the parent to use, and the list handles iterating the children and updating them.

You can use a managed property in the child class without defining a "regular" property. You would need a method to call SetProperty(), which allows the necessary rules to fire. Another option we use is to define a regular property with a public getter with a friend setter.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@rockfordlhotka
Comment options

Answer selected by Prashant3110kk
Comment options

You must be logged in to vote
1 reply
@rockfordlhotka
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants