c# - Pass a value between a Window and a page in WPF -
i developing software wpf , pass parameter(textbox) between window(mainwindow) page(it situated in frame) ...do have idea it?
thansk friends... bb
edited : have textbox in mainwindow value "db2012_2013" code of frame 1 :
<frame horizontalcontentalignment="stretch" loadcompleted="frsample_loadcompleted" navigating="frsample_navigating" verticalcontentalignment="stretch" x:name="frsample" background="{x:null}" margin="0,0,0,0" source="{binding selecteditem.xamlfilepath, elementname=categorytreeview, fallbackvalue=welcome.xaml, isasync=true}"/>
then when choose page open pass value of textbox in new page ... use value query ..
you can use datacontext , wpf binding feature.
you can set datacontext belong mainwindow. need pass data frame or ui component textbox?
<textbox name="textbox" text="text"></textbox> <frame datacontext="{binding elementname=textbox,path=datacontext}" background="aliceblue" width="200">