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";