Referencing Parent Window from a child Page
Hi,
I seem to be struggling with a problem that seems like it should be straightforward to fix.
I have a wpf application that has a main window. This window stays open for the entire life of the program.
All of the contnet is loaded into pages within the main window.
My question is this:
How can i get or set the value of a TextBlock in the parent window from the page?
I've tried referencing it direct
Dim userid as string = MasterWindow.TextUserID.Text
I've tried
dim master as new MasterWindow
Dim userid as string = master.TextUserID.Text
but I cant actually grab the value that is held.
I cant seem to set it either.
Can someone please give me a simple example of how I can do this?
Thanks