views:

233

answers:

1

How we can pass the values from a child window to the parent window in silverlight 3 by using Properties (ie Databinding).

In my work, it includes a parent window and a child window. The child window contains a text box, which returns a value after the hitting OK button it to Parent window. I already did this by using message sending and receiving events. But now i wish to change that to using properties.

+1  A: 

Parent Window:

ChildWindow myWin = new MyWindow("Test", "Test of shared ui elemnts"); myWin.Show(); myWin.Closed += new EventHandler(myWin_Closed);

void errorWin_Closed(object sender, EventArgs e) { ErrorWindow wrr = (ErrorWindow)sender; string mytext = wrr.MyText; // Can access any property that was set ChildWindow }

NewAgeSolution