Skip to content

Commit

Permalink
fix: Capture the DispatcherQueue on DependencyObject creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban committed Dec 1, 2021
1 parent 546441d commit 9d7e399
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ private static void GenerateDependencyObjectImplementation(IndentedStringBuilder
builder.AppendLineInvariant(@"public Windows.UI.Core.CoreDispatcher Dispatcher => Windows.ApplicationModel.Core.CoreApplication.MainView.Dispatcher;");

builder.AppendLineInvariant(@"#if HAS_UNO_WINUI");
builder.AppendLineInvariant(@"public global::Microsoft.UI.Dispatching.DispatcherQueue DispatcherQueue => global::Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread();");
builder.AppendLineInvariant(@"public global::Microsoft.UI.Dispatching.DispatcherQueue DispatcherQueue {{ get; }} = global::Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread();");
builder.AppendLineInvariant(@"#endif");

using (builder.BlockInvariant($"private DependencyObjectStore __Store"))
Expand Down

0 comments on commit 9d7e399

Please sign in to comment.