How to refer to the mainwindow class from another class.
Creating a WPF app. I have one main class where all the mainwindow controls are operated.
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); InitializeAPIs(); }
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); InitializeAPIs(); }
I have a different class that's called FilterManager. In this class I want to operate some data on the mainwindow as well. But I'm not sure how, what's a clean way to refer to the mainwindow from this class?
internal class FilterManager { // Reference to MainWindow here }
internal class FilterManager { // Reference to MainWindow here }