Application.Current.MainWindow. ?
How get control from non-window class in WPF?
1965
19-Jul-2013
Vijay Shukla
19-Jul-2013If your control is in the main window of your application, you most likely need to cast it to the appropriate type. For example, if your "main window" is named Window1 (default naming), you could do:
Window1 myWindow = Application.Current.MainWindow as Window1;