Skip to content

Commit

Permalink
feat: Add DispatcherQueue on CoreWIndow and CoreApplicationView
Browse files Browse the repository at this point in the history
  • Loading branch information
dr1rrb committed Nov 12, 2021
1 parent 1e7103f commit e176c77
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Uno.UI/UI/Xaml/Controls/ScrollViewer/ScrollViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public static class ScrollBarsSeparator
public const string ExpandedWithoutAnimation = "ScrollBarSeparatorExpandedWithoutAnimation";
public const string CollapsedWithoutAnimation = "ScrollBarSeparatorCollapsedWithoutAnimation";

// On WinUI3 visuals states are prefixed with "ScrolBar***s***" (with a trailing 's')
// On WinUI3 visuals states are prefixed with "ScrollBar***s***" (with a trailing 's')
//public const string Collapsed = "ScrollBarsSeparatorCollapsed";
//public const string CollapsedDisabled = "ScrollBarsSeparatorCollapsedDisabled"; // Not supported yet
//public const string Expanded = "ScrollBarsSeparatorExpanded";
Expand Down
3 changes: 3 additions & 0 deletions src/Uno.UWP/ApplicationModel/Core/CoreApplicationView.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Windows.System;
using Windows.UI.Core;

namespace Windows.ApplicationModel.Core
Expand All @@ -14,6 +15,8 @@ public CoreApplicationView()

public CoreDispatcher Dispatcher => CoreDispatcher.Main;

public DispatcherQueue DispatcherQueue { get; } = DispatcherQueue.GetForCurrentThread();

public CoreApplicationViewTitleBar TitleBar
{
get
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public bool IsComponent
}
}
#endif
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.System.DispatcherQueue DispatcherQueue
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public object AutomationHostProvider
#endif
// Skipping already declared property Visible
// Skipping already declared property ActivationMode
#if __ANDROID__ || __IOS__ || NET461 || __WASM__ || __SKIA__ || __NETSTD_REFERENCE__ || __MACOS__
#if false
[global::Uno.NotImplemented("__ANDROID__", "__IOS__", "NET461", "__WASM__", "__SKIA__", "__NETSTD_REFERENCE__", "__MACOS__")]
public global::Windows.System.DispatcherQueue DispatcherQueue
{
Expand Down
3 changes: 3 additions & 0 deletions src/Uno.UWP/UI/Core/CoreWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Uno.Extensions;
using Uno.UI.Core;
using Windows.Foundation;
using Windows.System;
using Windows.UI.Input;

namespace Windows.UI.Core
Expand Down Expand Up @@ -52,6 +53,8 @@ internal CoreWindow()
/// </summary>
public CoreDispatcher Dispatcher => CoreDispatcher.Main;

public DispatcherQueue DispatcherQueue { get; } = DispatcherQueue.GetForCurrentThread();

/// <summary>
/// Gets the client coordinates of the pointer.
/// </summary>
Expand Down

0 comments on commit e176c77

Please sign in to comment.