dakota5150 0 Newbie Poster

I have a label and text block on a WPF window and I'm trying to update those from a 2nd cs code file. I've tried the below code but the label is not getting updated...any help is greatly appreciated!

MainWindow main = new MainWindow();
             
            main.statusLabel.Content = "Blah...blah";
            main.statusTextBlock.Text = "Blah...blah";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.