Skip to content

Commit 767eba4

Browse files
authored
[release/8.0.1xx-rc1] Merge net8.0 to rc1 (#17169)
### Description of Change Bring latest changes from net8.0 to RC1
2 parents 3191376 + acc4b39 commit 767eba4

File tree

93 files changed

+2135
-652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2135
-652
lines changed

Diff for: eng/AndroidX.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<ItemGroup>
33
<PackageReference
44
Update="Xamarin.AndroidX.AppCompat.AppCompatResources"
5-
Version="1.6.1.3"
5+
Version="1.6.1.4"
66
/>
77
<PackageReference
88
Update="Xamarin.AndroidX.Browser"

Diff for: eng/Versions.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
<SystemIOUnmanagedMemoryStreamPackageVersion>4.3.0</SystemIOUnmanagedMemoryStreamPackageVersion>
6161
<SystemObjectModelPackageVersion>4.3.0</SystemObjectModelPackageVersion>
6262
<SystemRuntimeCompilerServicesUnsafePackageVersion>6.0.0</SystemRuntimeCompilerServicesUnsafePackageVersion>
63-
<_MicrosoftWebWebView2Version>1.0.1901.177</_MicrosoftWebWebView2Version>
63+
<_MicrosoftWebWebView2Version>1.0.1938.49</_MicrosoftWebWebView2Version>
6464
<!-- GLIDE - the android maven artifact in /src/Core/AndroidNative/maui/build.gradle -->
6565
<!-- must be kept in sync with the binding library version to it here: -->
6666
<_XamarinAndroidGlideVersion>4.15.1.2</_XamarinAndroidGlideVersion>

Diff for: eng/cake/dotnet.cake

-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,6 @@ Task("dotnet-diff")
389389
.AppendQuoted(nupkg.FullPath)
390390
.Append("--latest")
391391
// .Append("--verbose")
392-
.Append("--prerelease")
393392
.Append("--group-ids")
394393
.Append("--ignore-unchanged")
395394
.AppendSwitchQuoted("--output", GetDiffDirectory().FullPath)

Diff for: src/BlazorWebView/samples/BlazorWinFormsApp/BlazorWinFormsApp.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<OutputType>WinExe</OutputType>
99
<UseWindowsForms>true</UseWindowsForms>
1010
<IsPackable>false</IsPackable>
11+
<IsTestProject>true</IsTestProject>
1112
</PropertyGroup>
1213

1314
<ItemGroup>

Diff for: src/BlazorWebView/tests/MauiDeviceTests/MauiBlazorWebView.DeviceTests.csproj

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<RootNamespace>Microsoft.Maui.MauiBlazorWebView.DeviceTests</RootNamespace>
88
<AssemblyName>Microsoft.Maui.MauiBlazorWebView.DeviceTests</AssemblyName>
99
<NoWarn>$(NoWarn),CA1416</NoWarn>
10+
<IsTestProject>true</IsTestProject>
1011
<!-- Disable multi-RID builds to workaround a parallel build issue -->
1112
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst'))">maccatalyst-x64</RuntimeIdentifier>
1213
<RuntimeIdentifier Condition="$(TargetFramework.Contains('-maccatalyst')) and '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'arm64'">maccatalyst-arm64</RuntimeIdentifier>

Diff for: src/Compatibility/Core/src/iOS/DragAndDropDelegate.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ public UIDragItem[] HandleDragStarting(View element, IVisualElementRenderer rend
147147

148148
if (args.Cancel)
149149
return;
150-
150+
#pragma warning disable CS0618 // Type or member is obsolete
151151
if (!args.Handled)
152+
#pragma warning restore CS0618 // Type or member is obsolete
152153
{
153154
UIImage uIImage = null;
154155
string clipDescription = String.Empty;

Diff for: src/Controls/samples/Controls.Sample.UITests/Elements/DragAndDropBetweenLayouts.xaml.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void ResetLayouts(object sender, System.EventArgs e)
138138
SLAllColors.Clear();
139139
SLRainbow.Clear();
140140

141-
var leftLayoutColors = new string[] { "Red", "Purple", "Yellow", "Blue"};
141+
var leftLayoutColors = new string[] { "Red", "Purple", "Yellow", "Blue" };
142142
foreach (var color in leftLayoutColors)
143143
{
144144
SLAllColors.Add(RegenerateColorLabel(color));
@@ -185,5 +185,5 @@ void ResetTestLabels()
185185
dropRelativeScreen.Text = "Drop relative to screen:";
186186
dropRelativeLabel.Text = "Drop relative to this label:";
187187
}
188-
}
188+
}
189189
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
AutomationId="DragAndDropEventArgs"
5+
x:Class="Maui.Controls.Sample.DragAndDropEventArgs">
6+
<StackLayout>
7+
<StackLayout Orientation="Horizontal">
8+
<Label HeightRequest="200" WidthRequest="200" AutomationId="LabelDragElement"
9+
Text="Drag me Over the Purple Box, off the purple box, drop me on the purple box, and then verify all the correct events fired">
10+
<Label.GestureRecognizers>
11+
<DragGestureRecognizer DragStarting="DragStarting" DropCompleted="DropCompleted"></DragGestureRecognizer>
12+
</Label.GestureRecognizers>
13+
</Label>
14+
<Label HeightRequest="200" HorizontalOptions="FillAndExpand" Background="Purple" AutomationId="DragTarget">
15+
<Label.GestureRecognizers>
16+
<DropGestureRecognizer DragLeave="DragLeave" DragOver="DragOver" Drop="Drop"></DropGestureRecognizer>
17+
</Label.GestureRecognizers>
18+
</Label>
19+
</StackLayout>
20+
<Label x:Name="events" AutomationId="DragEventsLabel" Text="EventsLabel">
21+
<Label.GestureRecognizers>
22+
<DropGestureRecognizer></DropGestureRecognizer>
23+
</Label.GestureRecognizers>
24+
</Label>
25+
</StackLayout>
26+
</ContentView>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
using Microsoft.Maui.Controls;
2+
using Microsoft.Maui.Controls.Xaml;
3+
4+
namespace Maui.Controls.Sample;
5+
6+
[XamlCompilation(XamlCompilationOptions.Compile)]
7+
public partial class DragAndDropEventArgs : ContentView
8+
{
9+
bool _emittedDragOver = false;
10+
public DragAndDropEventArgs()
11+
{
12+
InitializeComponent();
13+
}
14+
15+
void AddEvent(string name)
16+
{
17+
events.Text += $"{name},";
18+
}
19+
20+
void DragStarting(object sender, DragStartingEventArgs e)
21+
{
22+
_emittedDragOver = false;
23+
if (e.PlatformArgs is PlatformDragStartingEventArgs platformArgs)
24+
{
25+
#if IOS || MACCATALYST
26+
if (platformArgs.Sender is not null)
27+
AddEvent("DragStarting:" + nameof(platformArgs.Sender));
28+
if (platformArgs.DragInteraction is not null)
29+
AddEvent("DragStarting:" + nameof(platformArgs.DragInteraction));
30+
if (platformArgs.DragSession is not null)
31+
AddEvent("DragStarting:" + nameof(platformArgs.DragSession));
32+
#elif ANDROID
33+
if (platformArgs.Sender is not null)
34+
AddEvent("DragStarting:" + nameof(platformArgs.Sender));
35+
if (platformArgs.MotionEvent is not null)
36+
AddEvent("DragStarting:" + nameof(platformArgs.MotionEvent));
37+
#elif WINDOWS
38+
if (platformArgs.Sender is not null)
39+
AddEvent("DragStarting:" + nameof(platformArgs.Sender));
40+
if (platformArgs.DragStartingEventArgs is not null)
41+
AddEvent("DragStarting:" + nameof(platformArgs.DragStartingEventArgs));
42+
AddEvent("DragStarting:" + nameof(platformArgs.Handled));
43+
#endif
44+
}
45+
}
46+
47+
void DropCompleted(object sender, DropCompletedEventArgs e)
48+
{
49+
if (e.PlatformArgs is PlatformDropCompletedEventArgs platformArgs)
50+
{
51+
#if IOS || MACCATALYST
52+
if (platformArgs.Sender is not null)
53+
AddEvent("DropCompleted:" + nameof(platformArgs.Sender));
54+
if (platformArgs.DropInteraction is not null)
55+
AddEvent("DropCompleted:" + nameof(platformArgs.DropInteraction));
56+
if (platformArgs.DropSession is not null)
57+
AddEvent("DropCompleted:" + nameof(platformArgs.DropSession));
58+
#elif ANDROID
59+
if (platformArgs.Sender is not null)
60+
AddEvent("DropCompleted:" + nameof(platformArgs.Sender));
61+
if (platformArgs.DragEvent is not null)
62+
AddEvent("DropCompleted:" + nameof(platformArgs.DragEvent));
63+
#elif WINDOWS
64+
if (platformArgs.Sender is not null)
65+
AddEvent("DropCompleted:" + nameof(platformArgs.Sender));
66+
if (platformArgs.DropCompletedEventArgs is not null)
67+
AddEvent("DropCompleted:" + nameof(platformArgs.DropCompletedEventArgs));
68+
#endif
69+
}
70+
}
71+
72+
void DragLeave(object sender, DragEventArgs e)
73+
{
74+
if (e.PlatformArgs is PlatformDragEventArgs platformArgs)
75+
{
76+
#if IOS || MACCATALYST
77+
if (platformArgs.Sender is not null)
78+
AddEvent("DragLeave:" + nameof(platformArgs.Sender));
79+
if (platformArgs.DropInteraction is not null)
80+
AddEvent("DragLeave:" + nameof(platformArgs.DropInteraction));
81+
if (platformArgs.DropSession is not null)
82+
AddEvent("DragLeave:" + nameof(platformArgs.DropSession));
83+
#elif ANDROID
84+
if (platformArgs.Sender is not null)
85+
AddEvent("DragLeave:" + nameof(platformArgs.Sender));
86+
if (platformArgs.DragEvent is not null)
87+
AddEvent("DragLeave:" + nameof(platformArgs.DragEvent));
88+
#elif WINDOWS
89+
if (platformArgs.Sender is not null)
90+
AddEvent("DragLeave:" + nameof(platformArgs.Sender));
91+
if (platformArgs.DragEventArgs is not null)
92+
AddEvent("DragLeave:" + nameof(platformArgs.DragEventArgs));
93+
AddEvent("DragLeave:" + nameof(platformArgs.Handled));
94+
#endif
95+
}
96+
}
97+
98+
void DragOver(object sender, DragEventArgs e)
99+
{
100+
if (!_emittedDragOver) // This can generate a lot of noise, only add it once
101+
{
102+
if (e.PlatformArgs is PlatformDragEventArgs platformArgs)
103+
{
104+
#if IOS || MACCATALYST
105+
if (platformArgs.Sender is not null)
106+
AddEvent("DragOver:" + nameof(platformArgs.Sender));
107+
if (platformArgs.DropInteraction is not null)
108+
AddEvent("DragOver:" + nameof(platformArgs.DropInteraction));
109+
if (platformArgs.DropSession is not null)
110+
AddEvent("DragOver:" + nameof(platformArgs.DropSession));
111+
#elif ANDROID
112+
if (platformArgs.Sender is not null)
113+
AddEvent("DragOver:" + nameof(platformArgs.Sender));
114+
if (platformArgs.DragEvent is not null)
115+
AddEvent("DragOver:" + nameof(platformArgs.DragEvent));
116+
#elif WINDOWS
117+
if (platformArgs.Sender is not null)
118+
AddEvent("DragOver:" + nameof(platformArgs.Sender));
119+
if (platformArgs.DragEventArgs is not null)
120+
AddEvent("DragOver:" + nameof(platformArgs.DragEventArgs));
121+
#endif
122+
}
123+
_emittedDragOver = true;
124+
}
125+
}
126+
127+
void Drop(object sender, DropEventArgs e)
128+
{
129+
if (e.PlatformArgs is PlatformDropEventArgs platformArgs)
130+
{
131+
#if IOS || MACCATALYST
132+
if (platformArgs.Sender is not null)
133+
AddEvent("Drop:" + nameof(platformArgs.Sender));
134+
if (platformArgs.DropInteraction is not null)
135+
AddEvent("Drop:" + nameof(platformArgs.DropInteraction));
136+
if (platformArgs.DropSession is not null)
137+
AddEvent("Drop:" + nameof(platformArgs.DropSession));
138+
#elif ANDROID
139+
if (platformArgs.Sender is not null)
140+
AddEvent("Drop:" + nameof(platformArgs.Sender));
141+
if (platformArgs.DragEvent is not null)
142+
AddEvent("Drop:" + nameof(platformArgs.DragEvent));
143+
#elif WINDOWS
144+
if (platformArgs.Sender is not null)
145+
AddEvent("Drop:" + nameof(platformArgs.Sender));
146+
if (platformArgs.DragEventArgs is not null)
147+
AddEvent("Drop:" + nameof(platformArgs.DragEventArgs));
148+
#endif
149+
}
150+
}
151+
}

Diff for: src/Controls/samples/Controls.Sample.UITests/Elements/DragAndDropGallery.cs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public DragAndDropGallery()
99
{
1010
Add(new DragAndDropEvents());
1111
Add(new DragAndDropBetweenLayouts());
12+
Add(new DragAndDropEventArgs());
1213
}
1314
}
1415
}

0 commit comments

Comments
 (0)