How to get access to main window controls in WPF
WPF
3
Posts
2
Posters
0
Views
1
Watching
-
I want to access some of the public controls in MainWindow from a separate class in the same application domain. how can I do this?
-
I want to access some of the public controls in MainWindow from a separate class in the same application domain. how can I do this?
-
Try
Application curApp = Application.Current; Window mainWnd = curApp.MainWindow;
You can then access public mainWnd objects. Note: I have not tried this myself.Application curApp = Application.Current;
MainWindow mainWnd = curApp.MainWindow;