wpf - How to pass value from one window to another -


how pass value 1 variable textbox after it's set? on winforms, used use form1.textbox1.text = variable in winforms.

i set, , variable this...

 public shared property containerstring() string                     return m_containerstring         end         set(value string)             m_containerstring = value         end set     end property      private shared m_containerstring string 

basically, have window... user chooses variable, variable set @ containerstring. when form closes, wanted push variable open window's textbox.

i'm new wpf, forgive noobness.

this how window, , works perfectly... windows. i'm looking same thing control.

   dim strwindowtolookfor string = gettype(mainwindow).name              dim win = ( _                   w in application.current.windows _                   directcast(w, window).gettype.name = strwindowtolookfor _                   select w _                ).firstordefault             if win isnot nothing                 directcast(win, mainwindow).title = selectedcontainer             end if 

you can make window closing event : this.closed += mywindow_closed; , set variable in corresponding method.

private void mywindow_closed() {     textbox1.text = a; }