As far as I understand you are trying to implement Singleton template for accessing main form. And it looks like error about myMainWindow;
To do it right do the following in your MainWindow class:
private static MainWindow _instance = null;
public static MainWindow Instance
{
get
{
if (_instance == null)
{
_instance = new MainWindow();
}
return _instance;
}
}
then in your another class you can access instance of MainWindow like this:
MainWindow.Instance.lbl_1.Content = "Label text is change";