Created
February 19, 2019 13:06
-
-
Save blubbll/45e49928fe84ea4211cae3a96fdee549 to your computer and use it in GitHub Desktop.
C# dispatcher // access mainwindow from another class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MainWindow.main.Dispatcher.Invoke(new Action(delegate () | |
{ | |
var that = MainWindow.main.lblZuege; | |
that.Content = zuege; | |
})); | |
public static MainWindow main; | |
public MainWindow() | |
{ | |
InitializeComponent(); | |
main = this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment