Skip to content

[Question] How to propagate events or state between user controls #1907

Answered by FeodorFitsner
Dionkal asked this question in Q&A
Discussion options

You must be logged in to vote

Create some State class, keep its instance inside Parent control, pass the instance of State class to descendants, have "callback" variables if you need to "call" the parent - nothing special :) You have a correct thinking - from "childB" you notify parent and parent updates itself and "childB" - state changes should be propagated from top to bottom.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Dionkal
Comment options

@FeodorFitsner
Comment options

@Dionkal
Comment options

Answer selected by Dionkal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
help wanted Extra attention is needed
2 participants