locked
passing variables without navigation RRS feed

  • Question

  • hi

    is it possible to pass variables from page.xaml.cs to another user control(say myUserControl.xaml.cs) and display those variables in myUserControl.xaml.cs in a textbox but through page.xaml.cs?

    An event occurs in page.xaml.cs and when it does, i want to pass these variables to myUserControl without navigation from one user control to another. myUserControl.xaml is placed on page.xaml.

     

    any ideas anyone?

    Monday, May 11, 2009 9:58 AM

Answers

  •  i'm not sure what you mean by navigation.

    if you have an instance of your user control in page, you would just do something this in page's code:

    myUserControl.TextBoxName.Text = "some value";

    where TextBoxName is the name of a textbox that exists in myUserControl.

    Monday, May 11, 2009 1:05 PM

All replies

  •  i'm not sure what you mean by navigation.

    if you have an instance of your user control in page, you would just do something this in page's code:

    myUserControl.TextBoxName.Text = "some value";

    where TextBoxName is the name of a textbox that exists in myUserControl.

    Monday, May 11, 2009 1:05 PM
  • Never mind... found wat i was looking for... thanks anyway!!Smile

    Tuesday, May 12, 2009 6:49 AM