Skip to content

Commit 79c207a

Browse files
authored
Merge branch 'main' into remove_auto_defaults
2 parents 95630d6 + 4e3e20a commit 79c207a

File tree

171 files changed

+3445
-485
lines changed

Some content is hidden

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

171 files changed

+3445
-485
lines changed

.nuspec/Microsoft.Maui.Controls.targets

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
OptimizeIL = "true"
130130
DebugSymbols = "$(DebugSymbols)"
131131
DebugType = "$(DebugType)"
132+
DefaultCompile = "true"
132133
ValidateOnly = "$(_MauiXamlCValidateOnly)"
133134
KeepXamlResources = "$(MauiKeepXamlResources)" />
134135
<Touch Files="$(IntermediateOutputPath)XamlC.stamp" AlwaysCreate="True" />

Microsoft.Maui-net6.sln

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Extensions",
116116
EndProject
117117
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Maui.Controls.Sample.Profiling", "src\Controls\samples\Controls.Sample.Profiling\Maui.Controls.Sample.Profiling.csproj", "{75DB635C-0035-46E7-9A33-857D38082503}"
118118
EndProject
119+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8F075D72-B023-4B5A-AB5E-43CA38B6CE92}"
120+
EndProject
121+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Core.UnitTests-net6", "src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests-net6.csproj", "{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}"
122+
EndProject
123+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Maps-net6", "src\Controls\Maps\src\Controls.Maps-net6.csproj", "{09D4CF7F-7B0D-45FE-B017-561B2A981912}"
124+
EndProject
119125
Global
120126
GlobalSection(SolutionConfigurationPlatforms) = preSolution
121127
Debug|Any CPU = Debug|Any CPU
@@ -281,6 +287,14 @@ Global
281287
{75DB635C-0035-46E7-9A33-857D38082503}.Release|Any CPU.ActiveCfg = Release|Any CPU
282288
{75DB635C-0035-46E7-9A33-857D38082503}.Release|Any CPU.Build.0 = Release|Any CPU
283289
{75DB635C-0035-46E7-9A33-857D38082503}.Release|Any CPU.Deploy.0 = Release|Any CPU
290+
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
291+
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
292+
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
293+
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Release|Any CPU.Build.0 = Release|Any CPU
294+
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
295+
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Debug|Any CPU.Build.0 = Debug|Any CPU
296+
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Release|Any CPU.ActiveCfg = Release|Any CPU
297+
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Release|Any CPU.Build.0 = Release|Any CPU
284298
EndGlobalSection
285299
GlobalSection(SolutionProperties) = preSolution
286300
HideSolutionNode = FALSE
@@ -331,6 +345,9 @@ Global
331345
{081EE5E5-69D4-493C-9EB4-47423C4728AB} = {EC63FD88-5E12-46D7-B440-68F70241D987}
332346
{6EDE0C1B-B718-4331-99BA-423042CDBE24} = {EC63FD88-5E12-46D7-B440-68F70241D987}
333347
{75DB635C-0035-46E7-9A33-857D38082503} = {E1082E26-D700-4127-9329-66D673FD2D55}
348+
{8F075D72-B023-4B5A-AB5E-43CA38B6CE92} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
349+
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF} = {8F075D72-B023-4B5A-AB5E-43CA38B6CE92}
350+
{09D4CF7F-7B0D-45FE-B017-561B2A981912} = {50C758FE-4E10-409A-94F5-A75480960864}
334351
EndGlobalSection
335352
GlobalSection(ExtensibilityGlobals) = postSolution
336353
SolutionGuid = {0B8ABEAD-D2B5-4370-A187-62B5ABE4EE50}

src/Compatibility/ControlGallery/src/Android/RegistrarValidationService.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using Microsoft.Maui.Controls;
22
using Microsoft.Maui.Controls.Compatibility.ControlGallery.Android;
33
using Microsoft.Maui.Controls.Compatibility.ControlGallery;
4+
using Microsoft.Extensions.DependencyInjection;
45

56
[assembly: Dependency(typeof(RegistrarValidationService))]
67
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Android
@@ -21,7 +22,15 @@ public bool Validate(VisualElement element, out string message)
2122
if (element == null)
2223
return true;
2324

24-
var renderer = Platform.Android.Platform.CreateRendererWithContext(element, _context);
25+
object renderer = Platform.Android.Platform.CreateRendererWithContext(element, _context);
26+
27+
if (renderer == null
28+
|| renderer.GetType().Name == "DefaultRenderer"
29+
)
30+
{
31+
var sp = MauiApplication.Current.Services.GetRequiredService<IMauiHandlersServiceProvider>();
32+
renderer = sp.GetHandler(element.GetType());
33+
}
2534

2635
if (renderer == null
2736
|| renderer.GetType().Name == "DefaultRenderer"

src/Compatibility/ControlGallery/src/Core/CoreGallery.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,12 +552,21 @@ public void FilterPages(string filter)
552552
[Preserve(AllMembers = true)]
553553
internal class CoreRootPage : ContentPage
554554
{
555+
bool registrarValidated;
555556
CoreRootView CoreRootView { get; }
556557

557-
public CoreRootPage(Page rootPage, NavigationBehavior navigationBehavior = NavigationBehavior.PushAsync)
558+
protected override void OnAttachedHandler()
558559
{
559-
ValidateRegistrar();
560+
base.OnAttachedHandler();
561+
562+
if(!registrarValidated)
563+
ValidateRegistrar();
564+
565+
registrarValidated = true;
566+
}
560567

568+
public CoreRootPage(Page rootPage, NavigationBehavior navigationBehavior = NavigationBehavior.PushAsync)
569+
{
561570
var galleryFactory = DependencyService.Get<IPlatformSpecificCoreGalleryFactory>();
562571

563572
Title = galleryFactory?.Title ?? "Core Gallery";

src/Compatibility/ControlGallery/src/Core/GalleryPages/GradientGalleries/GradientViewsGallery.xaml.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
using Microsoft.Maui.Graphics;
1+
using Microsoft.Maui.Controls.Xaml;
2+
using Microsoft.Maui.Graphics;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.GradientGalleries
45
{
6+
[XamlCompilation(XamlCompilationOptions.Skip)]
57
public partial class GradientViewsGallery : ContentPage
68
{
79
public GradientViewsGallery()
@@ -106,4 +108,4 @@ void UpdateBackground(Brush background)
106108
TimePicker.Background = background;
107109
}
108110
}
109-
}
111+
}

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/BasicSwipeGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
using System;
22
using Microsoft.Maui.Controls.Internals;
3+
using Microsoft.Maui.Controls.Xaml;
34

45
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
56
{
67
[Preserve(AllMembers = true)]
8+
[XamlCompilation(XamlCompilationOptions.Skip)]
79
public partial class BasicSwipeGallery : ContentPage
810
{
911
public BasicSwipeGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/HorizontalSwipeThresholdGallery.xaml.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
1+
using Microsoft.Maui.Controls.Xaml;
2+
3+
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
24
{
5+
[XamlCompilation(XamlCompilationOptions.Skip)]
36
public partial class HorizontalSwipeThresholdGallery : ContentPage
47
{
58
public HorizontalSwipeThresholdGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/ResourceSwipeItemsGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.Maui.Controls.Internals;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
45
{
56
[Preserve(AllMembers = true)]
7+
[XamlCompilation(XamlCompilationOptions.Skip)]
68
public partial class ResourceSwipeItemsGallery : ContentPage
79
{
810
public ResourceSwipeItemsGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/SwipeBindableLayoutGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using System.Collections.ObjectModel;
22
using System.Windows.Input;
33
using Microsoft.Maui.Controls.Internals;
4+
using Microsoft.Maui.Controls.Xaml;
45

56
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
67
{
78
[Preserve(AllMembers = true)]
9+
[XamlCompilation(XamlCompilationOptions.Skip)]
810
public partial class SwipeBindableLayoutGallery : ContentPage
911
{
1012
public SwipeBindableLayoutGallery()

src/Compatibility/ControlGallery/src/Core/GalleryPages/SwipeViewGalleries/SwipeCarouselViewGallery.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using Microsoft.Maui.Controls.Internals;
2+
using Microsoft.Maui.Controls.Xaml;
23

34
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
45
{
56
[Preserve(AllMembers = true)]
7+
[XamlCompilation(XamlCompilationOptions.Skip)]
68
public partial class SwipeCarouselViewGallery : ContentPage
79
{
810
public SwipeCarouselViewGallery()

0 commit comments

Comments
 (0)