Skip to content

Commit

Permalink
Merge branch 'main' into remove_auto_defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWeen committed Jul 1, 2021
2 parents 95630d6 + 4e3e20a commit 79c207a
Show file tree
Hide file tree
Showing 171 changed files with 3,445 additions and 485 deletions.
1 change: 1 addition & 0 deletions .nuspec/Microsoft.Maui.Controls.targets
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@
OptimizeIL = "true"
DebugSymbols = "$(DebugSymbols)"
DebugType = "$(DebugType)"
DefaultCompile = "true"
ValidateOnly = "$(_MauiXamlCValidateOnly)"
KeepXamlResources = "$(MauiKeepXamlResources)" />
<Touch Files="$(IntermediateOutputPath)XamlC.stamp" AlwaysCreate="True" />
Expand Down
17 changes: 17 additions & 0 deletions Microsoft.Maui-net6.sln
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Maui.Extensions",
EndProject
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}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8F075D72-B023-4B5A-AB5E-43CA38B6CE92}"
EndProject
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}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Maps-net6", "src\Controls\Maps\src\Controls.Maps-net6.csproj", "{09D4CF7F-7B0D-45FE-B017-561B2A981912}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -281,6 +287,14 @@ Global
{75DB635C-0035-46E7-9A33-857D38082503}.Release|Any CPU.ActiveCfg = Release|Any CPU
{75DB635C-0035-46E7-9A33-857D38082503}.Release|Any CPU.Build.0 = Release|Any CPU
{75DB635C-0035-46E7-9A33-857D38082503}.Release|Any CPU.Deploy.0 = Release|Any CPU
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF}.Release|Any CPU.Build.0 = Release|Any CPU
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Debug|Any CPU.Build.0 = Debug|Any CPU
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Release|Any CPU.ActiveCfg = Release|Any CPU
{09D4CF7F-7B0D-45FE-B017-561B2A981912}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -331,6 +345,9 @@ Global
{081EE5E5-69D4-493C-9EB4-47423C4728AB} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{6EDE0C1B-B718-4331-99BA-423042CDBE24} = {EC63FD88-5E12-46D7-B440-68F70241D987}
{75DB635C-0035-46E7-9A33-857D38082503} = {E1082E26-D700-4127-9329-66D673FD2D55}
{8F075D72-B023-4B5A-AB5E-43CA38B6CE92} = {459BF674-83CB-46F6-881F-A2D2117DBF4D}
{4FA0DFAE-1C4A-46BC-BC56-ABB12A0DAFBF} = {8F075D72-B023-4B5A-AB5E-43CA38B6CE92}
{09D4CF7F-7B0D-45FE-B017-561B2A981912} = {50C758FE-4E10-409A-94F5-A75480960864}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0B8ABEAD-D2B5-4370-A187-62B5ABE4EE50}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility.ControlGallery.Android;
using Microsoft.Maui.Controls.Compatibility.ControlGallery;
using Microsoft.Extensions.DependencyInjection;

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

var renderer = Platform.Android.Platform.CreateRendererWithContext(element, _context);
object renderer = Platform.Android.Platform.CreateRendererWithContext(element, _context);

if (renderer == null
|| renderer.GetType().Name == "DefaultRenderer"
)
{
var sp = MauiApplication.Current.Services.GetRequiredService<IMauiHandlersServiceProvider>();
renderer = sp.GetHandler(element.GetType());
}

if (renderer == null
|| renderer.GetType().Name == "DefaultRenderer"
Expand Down
13 changes: 11 additions & 2 deletions src/Compatibility/ControlGallery/src/Core/CoreGallery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -552,12 +552,21 @@ public void FilterPages(string filter)
[Preserve(AllMembers = true)]
internal class CoreRootPage : ContentPage
{
bool registrarValidated;
CoreRootView CoreRootView { get; }

public CoreRootPage(Page rootPage, NavigationBehavior navigationBehavior = NavigationBehavior.PushAsync)
protected override void OnAttachedHandler()
{
ValidateRegistrar();
base.OnAttachedHandler();

if(!registrarValidated)
ValidateRegistrar();

registrarValidated = true;
}

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

Title = galleryFactory?.Title ?? "Core Gallery";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Controls.Xaml;
using Microsoft.Maui.Graphics;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.GradientGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class GradientViewsGallery : ContentPage
{
public GradientViewsGallery()
Expand Down Expand Up @@ -106,4 +108,4 @@ void UpdateBackground(Brush background)
TimePicker.Background = background;
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class BasicSwipeGallery : ContentPage
{
public BasicSwipeGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class HorizontalSwipeThresholdGallery : ContentPage
{
public HorizontalSwipeThresholdGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class ResourceSwipeItemsGallery : ContentPage
{
public ResourceSwipeItemsGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Collections.ObjectModel;
using System.Windows.Input;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeBindableLayoutGallery : ContentPage
{
public SwipeBindableLayoutGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeCarouselViewGallery : ContentPage
{
public SwipeCarouselViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeHorizontalCollectionViewGallery : ContentPage
{
public SwipeHorizontalCollectionViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeListViewGallery : ContentPage
{
public SwipeListViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeVerticalCollectionViewGallery : ContentPage
{
public SwipeVerticalCollectionViewGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
using System.Collections.ObjectModel;
using System.Windows.Input;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeViewBindingContextGallery : ContentPage
{
public SwipeViewBindingContextGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeViewGestureRecognizerGallery : ContentPage
{
public SwipeViewGestureRecognizerGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class SwipeViewVisualStatesCollectionGallery : ContentPage
{
public SwipeViewVisualStatesCollectionGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.SwipeViewGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class VerticalSwipeThresholdGallery : ContentPage
{
public VerticalSwipeThresholdGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class DualScreenStateTriggerGallery : ContentPage
{
public DualScreenStateTriggerGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using System;
using System.Windows.Input;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class StateTriggerEventsGallery : ContentPage
{
public StateTriggerEventsGallery()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
using System.Windows.Input;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.GalleryPages.VisualStateManagerGalleries
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class StateTriggersDirectlyOnElements : ContentPage
{
public StateTriggersDirectlyOnElements()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
using System.Threading.Tasks;
using System.Xml.Linq;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class BlogPage : ContentPage
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Threading.Tasks;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class TwitterPage : ContentPage
{

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
using System.Text;
using System.Threading.Tasks;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;


namespace App2
{
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Page1 : ContentPage
{
public Page1()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.XamStore
{
[Preserve(AllMembers = true)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class DemoShellPage : ContentPage
{

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
Expand All @@ -8,6 +9,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 29107, "Xamarin.Android ScrollView text overlaps", PlatformAffected.Android)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Bugzilla29107 : TestContentPage
{
public Bugzilla29107()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
Expand All @@ -13,6 +14,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 45284, "[iOS10] Extra tab icons display in iOS when binding Title on TabbedPage", PlatformAffected.iOS)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Bugzilla45284 : TabbedPage
{
public Bugzilla45284()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
{
Expand All @@ -9,6 +10,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
#endif
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 54977, "Toolbaritems do not appear", PlatformAffected.Android, NavigationBehavior.PushAsync)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Bugzilla54977 : ContentPage
{
string _prefix;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Windows.Input;
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;

#if UITEST
using Xamarin.UITest;
Expand All @@ -21,6 +22,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
[Issue(IssueTracker.Github, 12910,
"[Bug] 'Cannot access a disposed object. Object name: 'DefaultRenderer' - on ios with CollectionView and EmptyView",
PlatformAffected.iOS)]
[XamlCompilation(XamlCompilationOptions.Skip)]
public partial class Issue12910 : TestContentPage
{
readonly Issue12910ViewModel _viewModel;
Expand Down
Loading

0 comments on commit 79c207a

Please sign in to comment.