Oh forgive me about access modifiers , don't need to set them in wpf.
but you can change your button properties as below:
suppose the window you want to change button inside it is MainWindow.
you can looking for it in open windows like this:
and change every control properties you want:
System.Windows.Window m = new System.Windows.Window();
foreach (System.Windows.Window w in Application.Current.Windows)
{
if (w.Name == "MainWindow")
{
m = w;
break;
}
}
(m as MainWindow).textBox1.Text = "test";