The "Correct" way to set control value from other class
<p>I would like to know the <strong>correct way</strong>(best looking) to set, for example, a label from a class other than my <code>MainWindow</code>. <br/></p>

<p>At the moment, I would do something like this:</p>

<pre><code>public partial class MainWindow: Window {
    public MainWindow() {
        InitializeComponent();

        MyClass a=new MyClass(this);
        a.WriteToLabel();
    }
}

class MyClass {
    MainWindow parent;

    public MyClass(MainWindow parent) {
        this.parent=parent;
    }

    public void WriteToLabel() {
        parent.label1.Text="Test";
    }
}
</code></pre>

<p>But I feel like this is kind of bad practice. <br/>
It feels really bad when you have more than 20 classes and all have a field or property of <code>parent</code>. <br/>
How would you solve a problem like this? </p>
