Terminador
Terminador

Reputation: 1398

How to reference to member of public partial class MainWindow : Window from other static class?

I have

public partial class MainWindow : Window

Also I have got some static class which does logging.

WHich the best way to refer/pass MainWindow to that static class is?

Upvotes: 1

Views: 1180

Answers (1)

Ashley Grenon
Ashley Grenon

Reputation: 9565

You can use Application.Current.MainWindow to access main window elsewhere in your application.

Upvotes: 4

Related Questions