Results 1 to 2 of 2

Thread: how i can pass data from class to page

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    3

    how i can pass data from class to page

    hi
    please i need to know how i can pass data from class to page

    i have MainPage and Page1 and Class1

    MainPage Content Page1
    and i do some operation in Class1 after finished i want to do something in Page1 via Class1

    i was tried this code and doesn't work

    Page1 p = Application.Current.RootVisual as Page1;

    p.txt1.Text = "Done";

  2. #2

    Thread Starter
    New Member
    Join Date
    May 2010
    Posts
    3

    Re: how i can pass data from class to page

    I'm solved it

    public class mycls
    {

    public void m(UserControl p)
    {
    var x = p as friendspage;
    x.txt1.Visibility = Visibility.Collapsed;
    }

    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width