Re: page in frame how to talk to controls in window?
I'll explain one way to do this, but then recommend that you take a different approach.
All you need to do is pass a reference of the window when you create the page and expose the control as a public property of the window. One way to do this is to pass the window reference in the Page constructor and then store it as a field.
That being said, it's usually not good to have such tight coupling between controls from one window (or page) and other window (or page). Coding this way, can lead to difficult to maintain code.
Instead, create a model for the data, and bind the views to the model (or bind to a ViewModel of the data). That way, when you make a change or perform an action in one window (or page), the data changes and any other view that is bound to the data will get the change (or be able to act on the change event). The benefit to this approach is that the views are loosely coupled and one view doesn't need to know about the controls from another view.
Bookmarks