Skip to content

Commit fdb22f2

Browse files
committed
Updated to WAS 1.0.0-preview2.
1 parent 96c8c05 commit fdb22f2

File tree

40 files changed

+135
-141
lines changed

40 files changed

+135
-141
lines changed

CommunityToolkit.WinUI.SampleApp.Package/CommunityToolkit.WinUI.SampleApp.Package.wapproj

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,7 @@
125125
<Content Include="Images\Wide310x150Logo.scale-400.png" />
126126
</ItemGroup>
127127
<ItemGroup>
128-
<PackageReference Include="Microsoft.ProjectReunion" Version="[0.8.4]">
129-
<IncludeAssets>build</IncludeAssets>
130-
</PackageReference>
131-
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="[0.8.4]">
128+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="[$(WindowsAppSDKVersion)]">
132129
<IncludeAssets>build</IncludeAssets>
133130
</PackageReference>
134131
</ItemGroup>

CommunityToolkit.WinUI.SampleApp/CommunityToolkit.WinUI.SampleApp.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@
3434
<Version>0.10.0-alpha</Version>
3535
</PackageReference>
3636
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed">
37-
<Version>2.0.4</Version>
37+
<Version>2.0.6</Version>
3838
</PackageReference>
3939
<PackageReference Include="System.ValueTuple">
4040
<Version>4.5.0</Version>
4141
</PackageReference>
42-
<PackageReference Include="Microsoft.ProjectReunion" Version="$(MicrosoftProjectReunionVersion)" />
42+
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$(WindowsAppSDKVersion)" />
4343
</ItemGroup>
4444
<ItemGroup>
4545
<Content Include="landingPageLinks.json" />

CommunityToolkit.WinUI.SampleApp/Shell.SamplePicker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private void ItemContainer_PointerExited(object sender, Microsoft.UI.Xaml.Input.
242242

243243
private void ItemContainer_PointerEntered(object sender, Microsoft.UI.Xaml.Input.PointerRoutedEventArgs e)
244244
{
245-
if (e.Pointer.PointerDeviceType == Windows.Devices.Input.PointerDeviceType.Mouse &&
245+
if (e.Pointer.PointerDeviceType == Microsoft.UI.Input.PointerDeviceType.Mouse &&
246246
(sender as FrameworkElement)?.FindDescendant<DropShadowPanel>() is FrameworkElement panel)
247247
{
248248
panel.Visibility = Visibility.Visible;

CommunityToolkit.WinUI.UI.Behaviors/CommunityToolkit.WinUI.UI.Behaviors.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<UseWindowsDesktopSdk>true</UseWindowsDesktopSdk>
@@ -22,7 +22,7 @@
2222
</PropertyGroup>
2323

2424
<ItemGroup>
25-
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.4" />
25+
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.6" />
2626
</ItemGroup>
2727

2828
<ItemGroup>

CommunityToolkit.WinUI.UI.Controls.Core/Menu/Menu.Logic.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ private static MenuItem GetNextMenuItem(Menu menu, int moveCount)
137137

138138
private static string MapInputToGestureKey(VirtualKey key, bool menuHasFocus = false)
139139
{
140-
var isCtrlDown = KeyboardInput.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
141-
var isShiftDown = KeyboardInput.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down);
142-
var isAltDown = KeyboardInput.GetKeyStateForCurrentThread(VirtualKey.Menu).HasFlag(CoreVirtualKeyStates.Down) || menuHasFocus;
140+
var isCtrlDown = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
141+
var isShiftDown = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down);
142+
var isAltDown = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Menu).HasFlag(CoreVirtualKeyStates.Down) || menuHasFocus;
143143

144144
if (!isCtrlDown && !isShiftDown && !isAltDown)
145145
{

CommunityToolkit.WinUI.UI.Controls.Core/TextToolbar/TextToolbar.Events.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -308,23 +308,23 @@ private bool IsDoingShortcut(VirtualKey pressedKey)
308308
/// </summary>
309309
public bool ControlKeyDown
310310
{
311-
get { return IsKeyActive(KeyboardInput.GetKeyStateForCurrentThread(VirtualKey.Control)); }
311+
get { return IsKeyActive(InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control)); }
312312
}
313313

314314
/// <summary>
315315
/// Gets a value indicating whether Menu is pressed down
316316
/// </summary>
317317
public bool MenuKeyDown
318318
{
319-
get { return IsKeyActive(KeyboardInput.GetKeyStateForCurrentThread(VirtualKey.Menu)); }
319+
get { return IsKeyActive(InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Menu)); }
320320
}
321321

322322
/// <summary>
323323
/// Gets a value indicating whether Shift is pressed down
324324
/// </summary>
325325
public bool ShiftKeyDown
326326
{
327-
get { return IsKeyActive(KeyboardInput.GetKeyStateForCurrentThread(VirtualKey.Shift)); }
327+
get { return IsKeyActive(InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift)); }
328328
}
329329

330330
/// <summary>

CommunityToolkit.WinUI.UI.Controls.DataGrid/DataGrid/DataGrid.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using CommunityToolkit.WinUI.UI.Data.Utilities;
1919
using CommunityToolkit.WinUI.UI.Utilities;
2020
using CommunityToolkit.WinUI.Utilities;
21+
using Microsoft.UI.Input;
2122
using Microsoft.UI.Xaml;
2223
using Microsoft.UI.Xaml.Automation.Peers;
2324
using Microsoft.UI.Xaml.Controls;
@@ -27,7 +28,6 @@
2728
using Microsoft.UI.Xaml.Media;
2829
using Microsoft.UI.Xaml.Media.Animation;
2930
using Windows.ApplicationModel.DataTransfer;
30-
using Windows.Devices.Input;
3131
using Windows.Foundation;
3232
using Windows.Foundation.Collections;
3333
using Windows.System;

CommunityToolkit.WinUI.UI.Controls.DataGrid/DataGrid/DataGridCell.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
using CommunityToolkit.WinUI.UI.Controls.DataGridInternals;
88
using CommunityToolkit.WinUI.UI.Controls.Utilities;
99
using CommunityToolkit.WinUI.UI.Utilities;
10+
using Microsoft.UI.Input;
1011
using Microsoft.UI.Xaml;
1112
using Microsoft.UI.Xaml.Automation.Peers;
1213
using Microsoft.UI.Xaml.Controls;
1314
using Microsoft.UI.Xaml.Input;
1415
using Microsoft.UI.Xaml.Shapes;
15-
using Windows.Devices.Input;
16-
1716
using DiagnosticsDebug = System.Diagnostics.Debug;
1817

1918
namespace CommunityToolkit.WinUI.UI.Controls

CommunityToolkit.WinUI.UI.Controls.DataGrid/DataGrid/DataGridColumnHeader.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
using CommunityToolkit.WinUI.UI.Controls.Utilities;
1010
using CommunityToolkit.WinUI.UI.Utilities;
1111
using CommunityToolkit.WinUI.Utilities;
12+
using Microsoft.UI.Input;
1213
using Microsoft.UI.Xaml;
1314
using Microsoft.UI.Xaml.Automation.Peers;
1415
using Microsoft.UI.Xaml.Controls;
1516
using Microsoft.UI.Xaml.Controls.Primitives;
1617
using Microsoft.UI.Xaml.Input;
1718
using Microsoft.UI.Xaml.Media;
18-
using Windows.Devices.Input;
1919
using Windows.Foundation;
2020
using Windows.UI.Core;
2121

@@ -1102,18 +1102,20 @@ private void SetResizeCursor(Pointer pointer, Point pointerPosition)
11021102

11031103
if (this.OwningGrid.IsEnabled && (nearCurrentResizableColumnRightEdge || nearPreviousResizableColumnLeftEdge))
11041104
{
1105-
CoreCursor currentCursor = ProtectedCursor;
1105+
InputCursor currentCursor = ProtectedCursor;
11061106
if (currentCursor == null)
11071107
{
1108-
currentCursor = new CoreCursor(CoreCursorType.Arrow, 0);
1108+
currentCursor = InputSystemCursor.Create(InputSystemCursorShape.Arrow);
11091109
}
11101110

1111-
if (currentCursor != null && currentCursor.Type != CoreCursorType.SizeWestEast)
1111+
if (currentCursor != null &&
1112+
(currentCursor is InputDesktopResourceCursor ||
1113+
(currentCursor is InputSystemCursor inputSystemCursor && inputSystemCursor.CursorShape != InputSystemCursorShape.SizeWestEast)))
11121114
{
11131115
interactionInfo.OriginalCursor = currentCursor;
11141116
interactionInfo.ResizePointerId = pointer.PointerId;
11151117

1116-
var newCursor = new CoreCursor(CoreCursorType.SizeWestEast, 0);
1118+
var newCursor = InputSystemCursor.Create(InputSystemCursorShape.SizeWestEast);
11171119
ProtectedCursor = newCursor;
11181120
}
11191121
}

CommunityToolkit.WinUI.UI.Controls.DataGrid/DataGrid/DataGridColumnHeaderInteractionInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using Microsoft.UI.Input;
56
using Microsoft.UI.Xaml.Input;
67
using Windows.Foundation;
7-
using Windows.UI.Core;
88

99
namespace CommunityToolkit.WinUI.UI.Controls.Primitives
1010
{
@@ -60,7 +60,7 @@ internal Point? LastPointerPositionHeaders
6060
set;
6161
}
6262

63-
internal CoreCursor OriginalCursor
63+
internal InputCursor OriginalCursor
6464
{
6565
get;
6666
set;

0 commit comments

Comments
 (0)