Open vnikopol opened 6 years ago
If i use Logging event, I get an error "The application called an interface that was marshalled for a different thread". I looked at the code, and
private void OnLog(LogLevel level, string message) ... Logging?.Invoke( .... perhaps need to use Dispatcher.RunAsync(()
private void OnLog(LogLevel level, string message) ... Logging?.Invoke(
Dispatcher.RunAsync(()
Hi vnikopol, you are right, please try this. Dispatcher.RunAsync(DispatcherPriority.Normal, () => OnLog(LogLevel.Debug, "It works!"));
Dispatcher.RunAsync(DispatcherPriority.Normal, () => OnLog(LogLevel.Debug, "It works!"));
I hope it would be useful to you.
If i use Logging event, I get an error "The application called an interface that was marshalled for a different thread". I looked at the code, and
private void OnLog(LogLevel level, string message) ... Logging?.Invoke(
.... perhaps need to useDispatcher.RunAsync(()