diff --git a/.nuspec/Microsoft.Maui.Controls.MultiTargeting.targets b/.nuspec/Microsoft.Maui.Controls.MultiTargeting.targets
index dbde4aba4ed6..18689fd7ca34 100644
--- a/.nuspec/Microsoft.Maui.Controls.MultiTargeting.targets
+++ b/.nuspec/Microsoft.Maui.Controls.MultiTargeting.targets
@@ -32,10 +32,16 @@
-
-
+
+
+
+
-
+
+
+
+
+
Platform\Windows\
@@ -64,7 +70,6 @@
$(DefineConstants);MACCATALYST;IOS
-
false
@@ -73,12 +78,19 @@
+
+
+
+
10.0.17763.0
win10-x86;win10-x64;win10-arm64
WINDOWS;$(DefineConstants)
+
+ WINDOWS_UWP;$(DefineConstants)
+
diff --git a/Compatibility.ControlGallery.sln b/Compatibility.ControlGallery.sln
index 046326d40b38..d5f55c5ca59f 100644
--- a/Compatibility.ControlGallery.sln
+++ b/Compatibility.ControlGallery.sln
@@ -77,22 +77,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials.DeviceTests.iOS"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.DeviceTests.Shared", "src\Essentials\test\DeviceTests.Shared\Essentials.DeviceTests.Shared.csproj", "{81128D28-CFC8-4EA4-B68D-9939339C461A}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5817A848-0B04-4035-9F7E-B8621B61CBDD}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.UWP", "src\Essentials\samples\Samples.UWP\Samples.UWP.csproj", "{5A1D97F2-6703-4278-BBF2-12C065F7E94A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.Tizen", "src\Essentials\samples\Samples.Tizen\Samples.Tizen.csproj", "{CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Mac", "src\Essentials\samples\Samples.Mac\Samples.Mac.csproj", "{89899D16-4BD1-49B1-9903-9F6BB26C5DC5}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.iOS", "src\Essentials\samples\Samples.iOS\Samples.iOS.csproj", "{AB6242B7-634F-4839-A991-7629D0D2C636}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.Android", "src\Essentials\samples\Samples.Android\Samples.Android.csproj", "{3C0CDEF3-495E-45F4-8B12-0E05EF11295C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples", "src\Essentials\samples\Samples\Samples.csproj", "{2C69EB76-02C4-4921-96A1-4D70CB7CE744}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Server.WebAuthenticator", "src\Essentials\samples\Sample.Server.WebAuthenticator\Sample.Server.WebAuthenticator.csproj", "{0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}"
-EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Benchmarks", "src\Core\tests\Benchmarks\Core.Benchmarks.csproj", "{73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{806499EB-C2CC-4E85-BC19-613F3DE5E0C3}"
@@ -654,218 +638,6 @@ Global
{81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|x64.Build.0 = Release|Any CPU
{81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|x86.ActiveCfg = Release|Any CPU
{81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|x86.Build.0 = Release|Any CPU
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|Any CPU.ActiveCfg = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|Any CPU.Build.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|Any CPU.Deploy.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|ARM.ActiveCfg = Debug|ARM
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|ARM.Build.0 = Debug|ARM
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|ARM.Deploy.0 = Debug|ARM
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|ARM64.ActiveCfg = Debug|ARM64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|ARM64.Build.0 = Debug|ARM64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|ARM64.Deploy.0 = Debug|ARM64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|iPhone.ActiveCfg = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|iPhone.Build.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|iPhone.Deploy.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|iPhoneSimulator.ActiveCfg = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|iPhoneSimulator.Build.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|iPhoneSimulator.Deploy.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|x64.ActiveCfg = Debug|x64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|x64.Build.0 = Debug|x64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|x64.Deploy.0 = Debug|x64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|x86.ActiveCfg = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|x86.Build.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Debug|x86.Deploy.0 = Debug|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|Any CPU.ActiveCfg = Release|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|ARM.ActiveCfg = Release|ARM
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|ARM.Build.0 = Release|ARM
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|ARM.Deploy.0 = Release|ARM
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|ARM64.ActiveCfg = Release|ARM64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|ARM64.Build.0 = Release|ARM64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|ARM64.Deploy.0 = Release|ARM64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|iPhone.ActiveCfg = Release|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|iPhoneSimulator.ActiveCfg = Release|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|x64.ActiveCfg = Release|x64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|x64.Build.0 = Release|x64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|x64.Deploy.0 = Release|x64
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|x86.ActiveCfg = Release|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|x86.Build.0 = Release|x86
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A}.Release|x86.Deploy.0 = Release|x86
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|ARM.Build.0 = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|ARM64.Build.0 = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|iPhone.Build.0 = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|x64.ActiveCfg = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|x64.Build.0 = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|x86.ActiveCfg = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Debug|x86.Build.0 = Debug|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|Any CPU.Build.0 = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|ARM.ActiveCfg = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|ARM.Build.0 = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|ARM64.ActiveCfg = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|ARM64.Build.0 = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|iPhone.ActiveCfg = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|iPhone.Build.0 = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|x64.ActiveCfg = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|x64.Build.0 = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|x86.ActiveCfg = Release|Any CPU
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348}.Release|x86.Build.0 = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|ARM.Build.0 = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|ARM64.Build.0 = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|iPhone.Build.0 = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|x64.Build.0 = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Debug|x86.Build.0 = Debug|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|Any CPU.Build.0 = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|ARM.ActiveCfg = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|ARM.Build.0 = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|ARM64.ActiveCfg = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|ARM64.Build.0 = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|iPhone.ActiveCfg = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|iPhone.Build.0 = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|x64.ActiveCfg = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|x64.Build.0 = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|x86.ActiveCfg = Release|Any CPU
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5}.Release|x86.Build.0 = Release|Any CPU
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|ARM64.ActiveCfg = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhone.ActiveCfg = Debug|iPhone
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhone.Build.0 = Debug|iPhone
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhone.Deploy.0 = Debug|iPhone
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x64.Build.0 = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x64.Deploy.0 = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhone.ActiveCfg = Release|iPhone
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhone.Build.0 = Release|iPhone
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|x64.ActiveCfg = Release|iPhoneSimulator
- {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|x86.ActiveCfg = Release|iPhoneSimulator
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|ARM.Build.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|ARM.Deploy.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|ARM64.Build.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|ARM64.Deploy.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|iPhone.Build.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|iPhone.Deploy.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|x64.ActiveCfg = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|x64.Build.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|x64.Deploy.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|x86.ActiveCfg = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|x86.Build.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Debug|x86.Deploy.0 = Debug|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|Any CPU.Build.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|Any CPU.Deploy.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|ARM.ActiveCfg = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|ARM.Build.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|ARM.Deploy.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|ARM64.ActiveCfg = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|ARM64.Build.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|ARM64.Deploy.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|iPhone.ActiveCfg = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|iPhone.Build.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|iPhone.Deploy.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|x64.ActiveCfg = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|x64.Build.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|x64.Deploy.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|x86.ActiveCfg = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|x86.Build.0 = Release|Any CPU
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C}.Release|x86.Deploy.0 = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM.Build.0 = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM64.Build.0 = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhone.Build.0 = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x64.ActiveCfg = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x64.Build.0 = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x86.ActiveCfg = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x86.Build.0 = Debug|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|Any CPU.Build.0 = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM.ActiveCfg = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM.Build.0 = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM64.ActiveCfg = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM64.Build.0 = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhone.ActiveCfg = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhone.Build.0 = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x64.ActiveCfg = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x64.Build.0 = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x86.ActiveCfg = Release|Any CPU
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x86.Build.0 = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM.ActiveCfg = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM.Build.0 = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM64.Build.0 = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhone.Build.0 = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x64.ActiveCfg = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x64.Build.0 = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x86.ActiveCfg = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x86.Build.0 = Debug|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|Any CPU.Build.0 = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM.ActiveCfg = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM.Build.0 = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM64.ActiveCfg = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM64.Build.0 = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhone.ActiveCfg = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhone.Build.0 = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x64.ActiveCfg = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x64.Build.0 = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x86.ActiveCfg = Release|Any CPU
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x86.Build.0 = Release|Any CPU
{73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|Any CPU.Build.0 = Debug|Any CPU
{73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|ARM.ActiveCfg = Debug|Any CPU
@@ -1566,14 +1338,6 @@ Global
{2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886} = {99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232}
{B73EB308-70BE-49FD-91A7-1D1495663D6D} = {99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232}
{81128D28-CFC8-4EA4-B68D-9939339C461A} = {99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232}
- {5817A848-0B04-4035-9F7E-B8621B61CBDD} = {DFD73007-5DB1-43AD-87A8-BD8622C2B192}
- {5A1D97F2-6703-4278-BBF2-12C065F7E94A} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
- {CFBEEB38-D3E8-4100-8CFB-E0A9C4FC0348} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
- {89899D16-4BD1-49B1-9903-9F6BB26C5DC5} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
- {AB6242B7-634F-4839-A991-7629D0D2C636} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
- {3C0CDEF3-495E-45F4-8B12-0E05EF11295C} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
- {2C69EB76-02C4-4921-96A1-4D70CB7CE744} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
- {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
{73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424} = {2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA}
{806499EB-C2CC-4E85-BC19-613F3DE5E0C3} = {9AD757F5-E57A-459D-A0A7-E0675E045B84}
{90B727DD-4C7B-4462-950F-61842A87DE8A} = {806499EB-C2CC-4E85-BC19-613F3DE5E0C3}
diff --git a/Directory.Build.props b/Directory.Build.props
index fbb320be4532..4f98b53a7dd5 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,12 +1,33 @@
+
+
true
true
net6.0-ios;net6.0-maccatalyst;net6.0-android
net6.0-windows10.0.18362
$(MauiPlatforms);$(WindowsTargetFramework)
$(WindowsTargetFramework)
+
+
+ Xamarin.iOS10;MonoAndroid10.0
+ netstandard2.0;netstandard2.1;Xamarin.iOS10;MonoAndroid90;MonoAndroid10.0;tizen40;Xamarin.Mac20;
+ $(NonNet6EssentialsPlatforms);uap10.0.16299;
+
+ false
+ true
+ Xamarin.iOS10
+ netstandard2.0;netstandard2.1;Xamarin.iOS10
+
+ false
+ MonoAndroid10.0
+ netstandard2.0;netstandard2.1;MonoAndroid10.0
+
+
+
+
+
<_MauiBuildTasksLocation>$(_MauiBuildTasksLocation)
<_MauiBuildTasksLocation Condition="'$(_MauiBuildTasksLocation)' == ''">$(MSBuildThisFileDirectory).nuspec\
true
diff --git a/Microsoft.Maui.iOS.sln b/Microsoft.Maui.iOS.sln
new file mode 100644
index 000000000000..30a61733db1c
--- /dev/null
+++ b/Microsoft.Maui.iOS.sln
@@ -0,0 +1,979 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30503.244
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Controls", "Controls", "{9AD757F5-E57A-459D-A0A7-E0675E045B84}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Compatibility", "Compatibility", "{29AC50BF-B4FB-450B-9386-0C5AD4B84226}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuspec", ".nuspec", "{7E12C50D-A570-4DF1-94E1-8599843FA87C}"
+ ProjectSection(SolutionItems) = preProject
+ eng\dogfood.ps1 = eng\dogfood.ps1
+ .nuspec\Microsoft.Maui.Controls.Compatibility.AppLinks.nuspec = .nuspec\Microsoft.Maui.Controls.Compatibility.AppLinks.nuspec
+ .nuspec\Microsoft.Maui.Controls.Compatibility.GTK.nuspec = .nuspec\Microsoft.Maui.Controls.Compatibility.GTK.nuspec
+ .nuspec\Microsoft.Maui.Controls.Compatibility.Maps.GTK.nuspec = .nuspec\Microsoft.Maui.Controls.Compatibility.Maps.GTK.nuspec
+ .nuspec\Microsoft.Maui.Controls.Compatibility.Maps.nuspec = .nuspec\Microsoft.Maui.Controls.Compatibility.Maps.nuspec
+ .nuspec\Microsoft.Maui.Controls.Compatibility.Maps.WPF.nuspec = .nuspec\Microsoft.Maui.Controls.Compatibility.Maps.WPF.nuspec
+ .nuspec\Microsoft.Maui.Controls.Compatibility.Visual.Material.nuspec = .nuspec\Microsoft.Maui.Controls.Compatibility.Visual.Material.nuspec
+ .nuspec\Microsoft.Maui.Controls.Compatibility.Visual.Material.targets = .nuspec\Microsoft.Maui.Controls.Compatibility.Visual.Material.targets
+ .nuspec\Microsoft.Maui.Controls.Compatibility.WPF.nuspec = .nuspec\Microsoft.Maui.Controls.Compatibility.WPF.nuspec
+ .nuspec\Microsoft.Maui.Controls.Debug.targets = .nuspec\Microsoft.Maui.Controls.Debug.targets
+ .nuspec\Microsoft.Maui.Controls.DefaultItems.props = .nuspec\Microsoft.Maui.Controls.DefaultItems.props
+ .nuspec\Microsoft.Maui.Controls.DefaultItems.targets = .nuspec\Microsoft.Maui.Controls.DefaultItems.targets
+ .nuspec\Microsoft.Maui.Controls.DualScreen.nuspec = .nuspec\Microsoft.Maui.Controls.DualScreen.nuspec
+ .nuspec\Microsoft.Maui.Controls.MultiTargeting.targets = .nuspec\Microsoft.Maui.Controls.MultiTargeting.targets
+ .nuspec\Microsoft.Maui.Controls.nuspec = .nuspec\Microsoft.Maui.Controls.nuspec
+ .nuspec\Microsoft.Maui.Controls.props = .nuspec\Microsoft.Maui.Controls.props
+ .nuspec\Microsoft.Maui.Controls.SingleProject.props = .nuspec\Microsoft.Maui.Controls.SingleProject.props
+ .nuspec\Microsoft.Maui.Controls.SingleProject.targets = .nuspec\Microsoft.Maui.Controls.SingleProject.targets
+ .nuspec\Microsoft.Maui.Controls.targets = .nuspec\Microsoft.Maui.Controls.targets
+ .nuspec\Microsoft.Maui.Resizetizer.targets = .nuspec\Microsoft.Maui.Resizetizer.targets
+ eng\package.ps1 = eng\package.ps1
+ .nuspec\proguard.cfg = .nuspec\proguard.cfg
+ EndProjectSection
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Core", "src\Controls\src\Core\Controls.Core.csproj", "{57B8B73D-C3B5-4C42-869E-7B2F17D354AC}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{31721EFD-3238-462B-B501-41F3D2B50E92}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Controls", "Controls", "{97FA536A-675D-41C7-A90E-97E2F79D1AE2}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{423C21C8-84CB-4A3C-BEB9-1C23D752D90F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core", "src\Core\src\Core.csproj", "{29913989-0F70-48D8-8EDE-B1DD217F21D1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Compatibility.iOS", "src\Compatibility\Core\src\iOS\Compatibility.iOS.csproj", "{271193C1-6E7C-429C-A36D-3F1BE5267231}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{D5B986A3-7FC9-437E-8030-349AA4698DFD}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{75A2CD30-BB85-4CA6-AC95-86A8A538A690}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Core.UnitTests", "src\Controls\tests\Core.UnitTests\Controls.Core.UnitTests.csproj", "{00259593-A283-47A5-ACB7-9C3819B16364}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Xaml", "src\Controls\src\Xaml\Controls.Xaml.csproj", "{BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Build.Tasks", "src\Controls\src\Build.Tasks\Controls.Build.Tasks.csproj", "{C328C538-B69F-43D2-80EE-3C1EB8254CBA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.UnitTests", "src\Core\tests\UnitTests\Core.UnitTests.csproj", "{7A753001-1C3D-404D-A421-2E052A545EAC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.DeviceTests", "src\Core\tests\DeviceTests\Core.DeviceTests.csproj", "{DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.DeviceTests.Android", "src\Core\tests\DeviceTests.Android\Core.DeviceTests.Android.csproj", "{A0B8D99F-4C0E-4D47-8182-9E8879A9B105}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core.DeviceTests.iOS", "src\Core\tests\DeviceTests.iOS\Core.DeviceTests.iOS.csproj", "{EE8FC716-27FC-405B-BD27-AF17E01A6671}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Essentials", "Essentials", "{DFD73007-5DB1-43AD-87A8-BD8622C2B192}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7E12E071-51C0-4668-9FF3-E2DE9DC51962}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials", "src\Essentials\src\Essentials.csproj", "{8CB95D25-8442-42BC-82BE-319D21138549}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.UnitTests", "src\Essentials\test\UnitTests\Essentials.UnitTests.csproj", "{2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials.DeviceTests.iOS", "src\Essentials\test\DeviceTests.iOS\Essentials.DeviceTests.iOS.csproj", "{B73EB308-70BE-49FD-91A7-1D1495663D6D}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.DeviceTests.Shared", "src\Essentials\test\DeviceTests.Shared\Essentials.DeviceTests.Shared.csproj", "{81128D28-CFC8-4EA4-B68D-9939339C461A}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{5817A848-0B04-4035-9F7E-B8621B61CBDD}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Essentials.Samples.iOS", "src\Essentials\samples\Samples.iOS\Essentials.Samples.iOS.csproj", "{AB6242B7-634F-4839-A991-7629D0D2C636}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.Samples", "src\Essentials\samples\Samples\Essentials.Samples.csproj", "{2C69EB76-02C4-4921-96A1-4D70CB7CE744}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Essentials.Sample.Server.WebAuthenticator", "src\Essentials\samples\Sample.Server.WebAuthenticator\Essentials.Sample.Server.WebAuthenticator.csproj", "{0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Core.Benchmarks", "src\Core\tests\Benchmarks\Core.Benchmarks.csproj", "{73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{806499EB-C2CC-4E85-BC19-613F3DE5E0C3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Sample", "src\Controls\samples\Controls.Sample\Controls.Sample.csproj", "{90B727DD-4C7B-4462-950F-61842A87DE8A}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Controls.Sample.iOS", "src\Controls\samples\Controls.Sample.iOS\Controls.Sample.iOS.csproj", "{D51AD52D-C4C6-445A-BD0F-884BE5C1C526}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Maps", "src\Controls\Maps\src\Controls.Maps.csproj", "{F2379E0F-524F-47BC-877C-0428E4C836D4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.Xaml.UnitTests", "src\Controls\tests\Xaml.UnitTests\Controls.Xaml.UnitTests.csproj", "{F905B72C-4DF7-408B-8B2B-50F9B8246A5E}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TestUtils", "TestUtils", "{0F9BA970-11B1-4ACA-AF41-1021AFC0F29C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtils", "src\TestUtils\TestUtils\src\TestUtils.csproj", "{E4CB9988-7348-4D55-A08E-85907732F8DA}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestUtils.DeviceTests", "src\TestUtils\TestUtils.DeviceTests\src\TestUtils.DeviceTests.csproj", "{551B2209-4298-4D60-B55C-79077B8BC244}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Resizetizer", "Resizetizer", "{4A3BAF64-E9D9-4036-9FDA-8B326C382667}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F83AC93C-9694-4A01-B9CB-7AA8E514B01F}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{08F720FF-7530-43BF-A252-8946927669E3}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Resizetizer", "src\SingleProject\Resizetizer\src\Resizetizer.csproj", "{3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Resizetizer.UnitTests", "src\SingleProject\Resizetizer\test\UnitTests\Resizetizer.UnitTests.csproj", "{BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SingleProject", "SingleProject", "{15878D2D-B0F1-4EE9-875D-4A643DB0C842}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Controls.CustomAttributes", "src\Controls\tests\CustomAttributes\Controls.CustomAttributes.csproj", "{D816B818-F58F-4738-93AE-924EFAB7A07F}"
+EndProject
+Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Compatibility.ControlGallery.Issues.Shared", "src\Compatibility\ControlGallery\src\Issues.Shared\Compatibility.ControlGallery.Issues.Shared.shproj", "{AE2513CB-4E5E-4E5C-8237-88954D4C9433}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Compatibility.ControlGallery.Core", "src\Compatibility\ControlGallery\src\Core\Compatibility.ControlGallery.Core.csproj", "{B5F94CCB-5868-43BD-89B5-B66C97C3A741}"
+EndProject
+Global
+ GlobalSection(SharedMSBuildProjectFiles) = preSolution
+ src\Compatibility\ControlGallery\src\Issues.Shared\Compatibility.ControlGallery.Issues.Shared.projitems*{ae2513cb-4e5e-4e5c-8237-88954d4c9433}*SharedItemsImports = 13
+ src\Compatibility\ControlGallery\src\Issues.Shared\Compatibility.ControlGallery.Issues.Shared.projitems*{b5f94ccb-5868-43bd-89b5-b66c97c3a741}*SharedItemsImports = 5
+ EndGlobalSection
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|ARM = Debug|ARM
+ Debug|ARM64 = Debug|ARM64
+ Debug|iPhone = Debug|iPhone
+ Debug|iPhoneSimulator = Debug|iPhoneSimulator
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|ARM = Release|ARM
+ Release|ARM64 = Release|ARM64
+ Release|iPhone = Release|iPhone
+ Release|iPhoneSimulator = Release|iPhoneSimulator
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|ARM.Build.0 = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|x64.Build.0 = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Debug|x86.Build.0 = Debug|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|ARM.ActiveCfg = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|ARM.Build.0 = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|ARM64.Build.0 = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|iPhone.Build.0 = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|x64.ActiveCfg = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|x64.Build.0 = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|x86.ActiveCfg = Release|Any CPU
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC}.Release|x86.Build.0 = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|ARM.Build.0 = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|x64.Build.0 = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Debug|x86.Build.0 = Debug|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|ARM.ActiveCfg = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|ARM.Build.0 = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|ARM64.Build.0 = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|iPhone.Build.0 = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|x64.ActiveCfg = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|x64.Build.0 = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|x86.ActiveCfg = Release|Any CPU
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1}.Release|x86.Build.0 = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|ARM.Build.0 = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|x64.Build.0 = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Debug|x86.Build.0 = Debug|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|Any CPU.Build.0 = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|ARM.ActiveCfg = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|ARM.Build.0 = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|ARM64.Build.0 = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|iPhone.Build.0 = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|x64.ActiveCfg = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|x64.Build.0 = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|x86.ActiveCfg = Release|Any CPU
+ {271193C1-6E7C-429C-A36D-3F1BE5267231}.Release|x86.Build.0 = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|ARM.Build.0 = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|x64.Build.0 = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Debug|x86.Build.0 = Debug|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|Any CPU.Build.0 = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|ARM.ActiveCfg = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|ARM.Build.0 = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|ARM64.Build.0 = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|iPhone.Build.0 = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|x64.ActiveCfg = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|x64.Build.0 = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|x86.ActiveCfg = Release|Any CPU
+ {00259593-A283-47A5-ACB7-9C3819B16364}.Release|x86.Build.0 = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|ARM.Build.0 = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|x64.Build.0 = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Debug|x86.Build.0 = Debug|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|ARM.ActiveCfg = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|ARM.Build.0 = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|ARM64.Build.0 = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|iPhone.Build.0 = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|x64.ActiveCfg = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|x64.Build.0 = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|x86.ActiveCfg = Release|Any CPU
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27}.Release|x86.Build.0 = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|ARM.Build.0 = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|x64.Build.0 = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Debug|x86.Build.0 = Debug|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|ARM.ActiveCfg = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|ARM.Build.0 = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|ARM64.Build.0 = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|iPhone.Build.0 = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|x64.ActiveCfg = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|x64.Build.0 = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|x86.ActiveCfg = Release|Any CPU
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA}.Release|x86.Build.0 = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|ARM.Build.0 = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|x64.Build.0 = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Debug|x86.Build.0 = Debug|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|ARM.ActiveCfg = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|ARM.Build.0 = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|ARM64.Build.0 = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|iPhone.Build.0 = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|x64.ActiveCfg = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|x64.Build.0 = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|x86.ActiveCfg = Release|Any CPU
+ {7A753001-1C3D-404D-A421-2E052A545EAC}.Release|x86.Build.0 = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|ARM.Build.0 = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|x64.Build.0 = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Debug|x86.Build.0 = Debug|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|ARM.ActiveCfg = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|ARM.Build.0 = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|ARM64.Build.0 = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|iPhone.Build.0 = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|x64.ActiveCfg = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|x64.Build.0 = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|x86.ActiveCfg = Release|Any CPU
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6}.Release|x86.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|ARM.Build.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|ARM.Deploy.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|ARM64.Deploy.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|iPhone.Deploy.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|x64.Build.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|x64.Deploy.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|x86.Build.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Debug|x86.Deploy.0 = Debug|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|Any CPU.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|Any CPU.Deploy.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|ARM.ActiveCfg = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|ARM.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|ARM.Deploy.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|ARM64.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|ARM64.Deploy.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|iPhone.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|iPhone.Deploy.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|x64.ActiveCfg = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|x64.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|x64.Deploy.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|x86.ActiveCfg = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|x86.Build.0 = Release|Any CPU
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105}.Release|x86.Deploy.0 = Release|Any CPU
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|Any CPU.Deploy.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|ARM.Build.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|ARM64.ActiveCfg = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|ARM64.Build.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|iPhone.Build.0 = Debug|iPhone
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|iPhone.Deploy.0 = Debug|iPhone
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|iPhoneSimulator.Deploy.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|x64.Build.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|x64.Deploy.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Debug|x86.Build.0 = Debug|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|ARM.Build.0 = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|ARM64.Build.0 = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|iPhone.ActiveCfg = Release|iPhone
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|iPhone.Build.0 = Release|iPhone
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|x64.ActiveCfg = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|x64.Build.0 = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|x86.ActiveCfg = Release|iPhoneSimulator
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671}.Release|x86.Build.0 = Release|iPhoneSimulator
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|ARM.Build.0 = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|x64.Build.0 = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Debug|x86.Build.0 = Debug|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|ARM.ActiveCfg = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|ARM.Build.0 = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|ARM64.Build.0 = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|iPhone.Build.0 = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|x64.ActiveCfg = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|x64.Build.0 = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|x86.ActiveCfg = Release|Any CPU
+ {8CB95D25-8442-42BC-82BE-319D21138549}.Release|x86.Build.0 = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|ARM.Build.0 = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|x64.Build.0 = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Debug|x86.Build.0 = Debug|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|ARM.ActiveCfg = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|ARM.Build.0 = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|ARM64.Build.0 = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|iPhone.Build.0 = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|x64.ActiveCfg = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|x64.Build.0 = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|x86.ActiveCfg = Release|Any CPU
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886}.Release|x86.Build.0 = Release|Any CPU
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|ARM64.ActiveCfg = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|iPhone.Build.0 = Debug|iPhone
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|iPhone.Deploy.0 = Debug|iPhone
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|x64.Build.0 = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|x64.Deploy.0 = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|iPhone.ActiveCfg = Release|iPhone
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|iPhone.Build.0 = Release|iPhone
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|x64.ActiveCfg = Release|iPhoneSimulator
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D}.Release|x86.ActiveCfg = Release|iPhoneSimulator
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|ARM.Build.0 = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|x64.Build.0 = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Debug|x86.Build.0 = Debug|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|ARM.ActiveCfg = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|ARM.Build.0 = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|ARM64.Build.0 = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|iPhone.Build.0 = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|x64.ActiveCfg = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|x64.Build.0 = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|x86.ActiveCfg = Release|Any CPU
+ {81128D28-CFC8-4EA4-B68D-9939339C461A}.Release|x86.Build.0 = Release|Any CPU
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|ARM64.ActiveCfg = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhone.Build.0 = Debug|iPhone
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhone.Deploy.0 = Debug|iPhone
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x64.Build.0 = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x64.Deploy.0 = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhone.ActiveCfg = Release|iPhone
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhone.Build.0 = Release|iPhone
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|x64.ActiveCfg = Release|iPhoneSimulator
+ {AB6242B7-634F-4839-A991-7629D0D2C636}.Release|x86.ActiveCfg = Release|iPhoneSimulator
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM.Build.0 = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x64.Build.0 = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Debug|x86.Build.0 = Debug|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|Any CPU.Build.0 = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM.ActiveCfg = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM.Build.0 = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|ARM64.Build.0 = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhone.Build.0 = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x64.ActiveCfg = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x64.Build.0 = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x86.ActiveCfg = Release|Any CPU
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744}.Release|x86.Build.0 = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM.Build.0 = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x64.Build.0 = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Debug|x86.Build.0 = Debug|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM.ActiveCfg = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM.Build.0 = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|ARM64.Build.0 = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhone.Build.0 = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x64.ActiveCfg = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x64.Build.0 = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x86.ActiveCfg = Release|Any CPU
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C}.Release|x86.Build.0 = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|ARM.Build.0 = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|x64.Build.0 = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Debug|x86.Build.0 = Debug|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|Any CPU.Build.0 = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|ARM.ActiveCfg = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|ARM.Build.0 = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|ARM64.Build.0 = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|iPhone.Build.0 = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|x64.ActiveCfg = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|x64.Build.0 = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|x86.ActiveCfg = Release|Any CPU
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424}.Release|x86.Build.0 = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|ARM.Build.0 = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|x64.Build.0 = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Debug|x86.Build.0 = Debug|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|ARM.ActiveCfg = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|ARM.Build.0 = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|ARM64.Build.0 = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|iPhone.Build.0 = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|x64.ActiveCfg = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|x64.Build.0 = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|x86.ActiveCfg = Release|Any CPU
+ {90B727DD-4C7B-4462-950F-61842A87DE8A}.Release|x86.Build.0 = Release|Any CPU
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|ARM64.ActiveCfg = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|iPhone.ActiveCfg = Debug|iPhone
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|iPhone.Build.0 = Debug|iPhone
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|ARM64.ActiveCfg = Release|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|iPhone.ActiveCfg = Release|iPhone
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|iPhone.Build.0 = Release|iPhone
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|x64.ActiveCfg = Release|iPhoneSimulator
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526}.Release|x86.ActiveCfg = Release|iPhoneSimulator
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|ARM.Build.0 = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|x64.Build.0 = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Debug|x86.Build.0 = Debug|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|ARM.ActiveCfg = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|ARM.Build.0 = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|ARM64.Build.0 = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|iPhone.Build.0 = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|x64.ActiveCfg = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|x64.Build.0 = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|x86.ActiveCfg = Release|Any CPU
+ {F2379E0F-524F-47BC-877C-0428E4C836D4}.Release|x86.Build.0 = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|ARM.Build.0 = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|x64.Build.0 = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Debug|x86.Build.0 = Debug|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|ARM.ActiveCfg = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|ARM.Build.0 = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|ARM64.Build.0 = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|iPhone.Build.0 = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|x64.ActiveCfg = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|x64.Build.0 = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|x86.ActiveCfg = Release|Any CPU
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E}.Release|x86.Build.0 = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|ARM.Build.0 = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|x64.Build.0 = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Debug|x86.Build.0 = Debug|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|ARM.ActiveCfg = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|ARM.Build.0 = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|ARM64.Build.0 = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|iPhone.Build.0 = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|x64.ActiveCfg = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|x64.Build.0 = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|x86.ActiveCfg = Release|Any CPU
+ {E4CB9988-7348-4D55-A08E-85907732F8DA}.Release|x86.Build.0 = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|ARM.Build.0 = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|x64.Build.0 = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Debug|x86.Build.0 = Debug|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|Any CPU.Build.0 = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|ARM.ActiveCfg = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|ARM.Build.0 = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|ARM64.Build.0 = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|iPhone.Build.0 = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|x64.ActiveCfg = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|x64.Build.0 = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|x86.ActiveCfg = Release|Any CPU
+ {551B2209-4298-4D60-B55C-79077B8BC244}.Release|x86.Build.0 = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|ARM.Build.0 = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|x64.Build.0 = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Debug|x86.Build.0 = Debug|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|ARM.ActiveCfg = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|ARM.Build.0 = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|ARM64.Build.0 = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|iPhone.Build.0 = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|x64.ActiveCfg = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|x64.Build.0 = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|x86.ActiveCfg = Release|Any CPU
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C}.Release|x86.Build.0 = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|ARM.Build.0 = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|x64.Build.0 = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Debug|x86.Build.0 = Debug|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|ARM.ActiveCfg = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|ARM.Build.0 = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|ARM64.Build.0 = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|iPhone.Build.0 = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|x64.ActiveCfg = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|x64.Build.0 = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|x86.ActiveCfg = Release|Any CPU
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5}.Release|x86.Build.0 = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|ARM.Build.0 = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|x64.Build.0 = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Debug|x86.Build.0 = Debug|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|ARM.ActiveCfg = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|ARM.Build.0 = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|ARM64.Build.0 = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|iPhone.Build.0 = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|x64.ActiveCfg = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|x64.Build.0 = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|x86.ActiveCfg = Release|Any CPU
+ {D816B818-F58F-4738-93AE-924EFAB7A07F}.Release|x86.Build.0 = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|ARM.ActiveCfg = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|ARM.Build.0 = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|ARM64.ActiveCfg = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|ARM64.Build.0 = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|iPhone.ActiveCfg = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|iPhone.Build.0 = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|x64.Build.0 = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Debug|x86.Build.0 = Debug|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|ARM.ActiveCfg = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|ARM.Build.0 = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|ARM64.ActiveCfg = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|ARM64.Build.0 = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|iPhone.ActiveCfg = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|iPhone.Build.0 = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|x64.ActiveCfg = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|x64.Build.0 = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|x86.ActiveCfg = Release|Any CPU
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {9AD757F5-E57A-459D-A0A7-E0675E045B84} = {97FA536A-675D-41C7-A90E-97E2F79D1AE2}
+ {29AC50BF-B4FB-450B-9386-0C5AD4B84226} = {97FA536A-675D-41C7-A90E-97E2F79D1AE2}
+ {57B8B73D-C3B5-4C42-869E-7B2F17D354AC} = {D5B986A3-7FC9-437E-8030-349AA4698DFD}
+ {423C21C8-84CB-4A3C-BEB9-1C23D752D90F} = {31721EFD-3238-462B-B501-41F3D2B50E92}
+ {2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA} = {31721EFD-3238-462B-B501-41F3D2B50E92}
+ {29913989-0F70-48D8-8EDE-B1DD217F21D1} = {423C21C8-84CB-4A3C-BEB9-1C23D752D90F}
+ {271193C1-6E7C-429C-A36D-3F1BE5267231} = {29AC50BF-B4FB-450B-9386-0C5AD4B84226}
+ {D5B986A3-7FC9-437E-8030-349AA4698DFD} = {9AD757F5-E57A-459D-A0A7-E0675E045B84}
+ {75A2CD30-BB85-4CA6-AC95-86A8A538A690} = {9AD757F5-E57A-459D-A0A7-E0675E045B84}
+ {00259593-A283-47A5-ACB7-9C3819B16364} = {75A2CD30-BB85-4CA6-AC95-86A8A538A690}
+ {BB98A559-62C4-4C98-90A0-9E4D8DF1CA27} = {D5B986A3-7FC9-437E-8030-349AA4698DFD}
+ {C328C538-B69F-43D2-80EE-3C1EB8254CBA} = {D5B986A3-7FC9-437E-8030-349AA4698DFD}
+ {7A753001-1C3D-404D-A421-2E052A545EAC} = {2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA}
+ {DA9E4D76-8CA4-4CC3-A47C-BA75DFF805C6} = {2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA}
+ {A0B8D99F-4C0E-4D47-8182-9E8879A9B105} = {2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA}
+ {EE8FC716-27FC-405B-BD27-AF17E01A6671} = {2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA}
+ {7E12E071-51C0-4668-9FF3-E2DE9DC51962} = {DFD73007-5DB1-43AD-87A8-BD8622C2B192}
+ {8CB95D25-8442-42BC-82BE-319D21138549} = {7E12E071-51C0-4668-9FF3-E2DE9DC51962}
+ {99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232} = {DFD73007-5DB1-43AD-87A8-BD8622C2B192}
+ {2E0EB4A3-3C4A-4A5E-8D2F-F77C62464886} = {99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232}
+ {B73EB308-70BE-49FD-91A7-1D1495663D6D} = {99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232}
+ {81128D28-CFC8-4EA4-B68D-9939339C461A} = {99FDF6CA-DCF8-4CB2-B2EA-E24CCB601232}
+ {5817A848-0B04-4035-9F7E-B8621B61CBDD} = {DFD73007-5DB1-43AD-87A8-BD8622C2B192}
+ {AB6242B7-634F-4839-A991-7629D0D2C636} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
+ {2C69EB76-02C4-4921-96A1-4D70CB7CE744} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
+ {0C1B038F-F5CD-4E3C-B9D7-040F020BA44C} = {5817A848-0B04-4035-9F7E-B8621B61CBDD}
+ {73100F0D-C0BB-4F16-8FC2-FA3FA8ACD424} = {2ACC7FFA-238F-44FD-93CB-4D9B17D8C4BA}
+ {806499EB-C2CC-4E85-BC19-613F3DE5E0C3} = {9AD757F5-E57A-459D-A0A7-E0675E045B84}
+ {90B727DD-4C7B-4462-950F-61842A87DE8A} = {806499EB-C2CC-4E85-BC19-613F3DE5E0C3}
+ {D51AD52D-C4C6-445A-BD0F-884BE5C1C526} = {806499EB-C2CC-4E85-BC19-613F3DE5E0C3}
+ {F2379E0F-524F-47BC-877C-0428E4C836D4} = {D5B986A3-7FC9-437E-8030-349AA4698DFD}
+ {F905B72C-4DF7-408B-8B2B-50F9B8246A5E} = {75A2CD30-BB85-4CA6-AC95-86A8A538A690}
+ {E4CB9988-7348-4D55-A08E-85907732F8DA} = {0F9BA970-11B1-4ACA-AF41-1021AFC0F29C}
+ {551B2209-4298-4D60-B55C-79077B8BC244} = {0F9BA970-11B1-4ACA-AF41-1021AFC0F29C}
+ {4A3BAF64-E9D9-4036-9FDA-8B326C382667} = {15878D2D-B0F1-4EE9-875D-4A643DB0C842}
+ {F83AC93C-9694-4A01-B9CB-7AA8E514B01F} = {4A3BAF64-E9D9-4036-9FDA-8B326C382667}
+ {08F720FF-7530-43BF-A252-8946927669E3} = {4A3BAF64-E9D9-4036-9FDA-8B326C382667}
+ {3E1D0DED-6B13-42C8-AA15-2EDFD8ECE80C} = {08F720FF-7530-43BF-A252-8946927669E3}
+ {BDFA84D6-6C6B-44C9-ABC5-563CFD0C4DB5} = {F83AC93C-9694-4A01-B9CB-7AA8E514B01F}
+ {D816B818-F58F-4738-93AE-924EFAB7A07F} = {75A2CD30-BB85-4CA6-AC95-86A8A538A690}
+ {AE2513CB-4E5E-4E5C-8237-88954D4C9433} = {75A2CD30-BB85-4CA6-AC95-86A8A538A690}
+ {B5F94CCB-5868-43BD-89B5-B66C97C3A741} = {75A2CD30-BB85-4CA6-AC95-86A8A538A690}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {650AE971-2F29-46A8-822C-FB4FCDC6A9A0}
+ EndGlobalSection
+EndGlobal
diff --git a/eng/AndroidX.targets b/eng/AndroidX.targets
index e0f88d9281e7..495deb1ffdee 100644
--- a/eng/AndroidX.targets
+++ b/eng/AndroidX.targets
@@ -19,6 +19,22 @@
Update="Xamarin.AndroidX.Lifecycle.LiveData"
Version="2.3.1-$(_AndroidXVersion)"
/>
+
+
+
+
{
((global::Android.Views.View)h.NativeView).ContentDescription = v.AutomationId;
diff --git a/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core-net6.csproj b/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core-net6.csproj
index b32645ecd9bc..b0181fb7ffa8 100644
--- a/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core-net6.csproj
+++ b/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core-net6.csproj
@@ -20,7 +20,7 @@
0114;0108;0109;4014;0649;0169;0472;0414;0168;0219;0429
- $(DefineConstants);__UWP__
+ $(DefineConstants);WINDOWS
diff --git a/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core.csproj b/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core.csproj
index 47c155fd1d0f..ac6a7f0086c6 100644
--- a/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core.csproj
+++ b/src/Compatibility/ControlGallery/src/Core/Compatibility.ControlGallery.Core.csproj
@@ -20,7 +20,7 @@
0114;0108;0109;4014;0649;0169;0472;0414;0168;0219;0429
- $(DefineConstants);__UWP__
+ $(DefineConstants);WINDOWS
diff --git a/src/Compatibility/ControlGallery/src/Core/GalleryPages/CellTypeList.cs b/src/Compatibility/ControlGallery/src/Core/GalleryPages/CellTypeList.cs
index 6a517327b5be..7c0ea5f775cd 100644
--- a/src/Compatibility/ControlGallery/src/Core/GalleryPages/CellTypeList.cs
+++ b/src/Compatibility/ControlGallery/src/Core/GalleryPages/CellTypeList.cs
@@ -71,7 +71,7 @@ public CellTypeList()
Navigation.PushAsync(cellNav.Page);
_last = cellNav;
-#if !__WINDOWS__
+#if !WINDOWS
SelectedItem = null;
#endif
};
diff --git a/src/Compatibility/ControlGallery/src/EmbeddingTestBeds/Embedding.UWP/Embedding.UWP.csproj b/src/Compatibility/ControlGallery/src/EmbeddingTestBeds/Embedding.UWP/Embedding.UWP.csproj
index 8fd741937aea..76e3504171ac 100644
--- a/src/Compatibility/ControlGallery/src/EmbeddingTestBeds/Embedding.UWP/Embedding.UWP.csproj
+++ b/src/Compatibility/ControlGallery/src/EmbeddingTestBeds/Embedding.UWP/Embedding.UWP.csproj
@@ -24,7 +24,7 @@
true
bin\x86\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
x86
@@ -34,7 +34,7 @@
bin\x86\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
@@ -47,7 +47,7 @@
true
bin\ARM\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
ARM
@@ -57,7 +57,7 @@
bin\ARM\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
@@ -70,7 +70,7 @@
true
bin\x64\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
x64
@@ -80,7 +80,7 @@
bin\x64\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla30353.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla30353.cs
index 6e98e72eb23a..dfe0b388cc1f 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla30353.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla30353.cs
@@ -125,7 +125,7 @@ public override void TearDown()
void Back()
{
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
RunningApp.Tap(q => q.Marked("Toggle"));
#else
RunningApp.Back();
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla40408.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla40408.cs
index d01b091de0ff..eebfe248232c 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla40408.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla40408.cs
@@ -124,7 +124,7 @@ void FlyoutPage1_Appearing(object sender, EventArgs e)
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void OnAppearingEvents()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla41271.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla41271.cs
index 1c441877f0bb..a864181c60cc 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla41271.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla41271.cs
@@ -123,7 +123,7 @@ protected override void Init()
}
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
string Cell;
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43519.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43519.cs
index c43edf4afe6b..b61abd2650d6 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43519.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43519.cs
@@ -79,7 +79,7 @@ protected override void Init()
});
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void TabbedModalNavigation()
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43663.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43663.cs
index bc85fb201c66..6dfce101dd09 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43663.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla43663.cs
@@ -125,7 +125,7 @@ void ModalPopped(object sender, ModalPoppedEventArgs e)
DisplayAlert("Popped", Message, Cancel);
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void ModalNavigation()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722.cs
index a294f0951d59..17fab3f08822 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722.cs
@@ -156,7 +156,7 @@ protected override void OnDisappearing()
base.OnDisappearing();
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void LabelsInListViewTemplatesShouldBeCollected()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722Xaml0.xaml.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722Xaml0.xaml.cs
index a300e814290a..f0a22256a199 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722Xaml0.xaml.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla45722Xaml0.xaml.cs
@@ -93,7 +93,7 @@ void RefreshModel()
}
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void LabelsInListViewTemplatesShouldBeCollected()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla51825.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla51825.cs
index 464b07ed82f4..be24c93b41c5 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla51825.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla51825.cs
@@ -61,7 +61,7 @@ public void Bugzilla51825Test()
// Windows App Driver and the Search Bar are a bit buggy
// It randomly doesn't enter the first letter
-#if !__WINDOWS__
+#if !WINDOWS
Assert.AreEqual("Hello", label.ReadText());
#endif
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla60122.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla60122.cs
index 2ab8d2a18226..dee0fff61bdb 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla60122.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Bugzilla60122.cs
@@ -52,7 +52,7 @@ public void HandleLongPress(object sender, EventArgs e)
}
}
-#if UITEST && !__WINDOWS__
+#if UITEST && !WINDOWS
// This test won't work on Windows right now because we can only test desktop, so touch events
// (like LongPress) don't really work. The test should work manually on a touch screen, though.
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/DateTimePickerLocalizationTests.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/DateTimePickerLocalizationTests.cs
index d73df7bd95a2..7b14d56cca93 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/DateTimePickerLocalizationTests.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/DateTimePickerLocalizationTests.cs
@@ -59,7 +59,7 @@ public string DateString(String format, String date)
public void TimePicker24H()
{
RunningApp.Tap(x => x.Marked("TimePicker"));
-#if !__WINDOWS__
+#if !WINDOWS
Assert.AreEqual("0.0.0 A", TimeString("H.m.s t", "0, 0"));
Assert.AreEqual("13:05 PM", TimeString("HH:mm tt", "13, 5"));
Assert.AreEqual("12 PM", TimeString("HH tt", "12, 0"));
@@ -70,7 +70,7 @@ public void TimePicker24H()
#endif
}
-#if !__WINDOWS__
+#if !WINDOWS
[Test]
public void TimePicker12H()
{
@@ -99,7 +99,7 @@ public void TimePickerOther()
public void DatePickerDMY()
{
RunningApp.Tap(x => x.Marked("DatePicker"));
-#if !__WINDOWS__
+#if !WINDOWS
Assert.AreEqual("31/1/99", DateString("d/M/y", "1999, 1, 31"));
Assert.AreEqual("02-29-00", DateString("MM-dd-yy", "2000, 2, 29"));
Assert.AreEqual("2010, Apr, Thu", DateString("yyy, MMM, ddd", "2010, 4, 15"));
@@ -118,7 +118,7 @@ public void DatePickerDMY()
public void DatePickerMissing()
{
RunningApp.Tap(x => x.Marked("DatePicker"));
-#if !__WINDOWS__
+#if !WINDOWS
Assert.AreEqual("October 97", DateString("MMMM yy", "1997, 10, 30"));
Assert.AreEqual("Monday", DateString("dddd", "2020, 7, 20"));
Assert.AreEqual("2002: Dec", DateString("yyyy: MMM", "2002, 12, 31"));
@@ -129,7 +129,7 @@ public void DatePickerMissing()
#endif
}
-#if !__WINDOWS__
+#if !WINDOWS
[Test]
public void DatePickerLetters()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/GestureBubblingTests.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/GestureBubblingTests.cs
index f3e276bc20a7..190b4d32c95f 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/GestureBubblingTests.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/GestureBubblingTests.cs
@@ -163,7 +163,7 @@ from Layout element in layout.InternalChildren
from Button button in element.InternalChildren
let text = button.Text
// UwpIgnore
-#if __WINDOWS__
+#if WINDOWS
where text != "Stepper" && text != "Entry"
#endif
select new object[]
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Helpers/UITestHelper.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Helpers/UITestHelper.cs
index e57bc5bc32b7..2cef291b5e10 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Helpers/UITestHelper.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Helpers/UITestHelper.cs
@@ -16,7 +16,7 @@ public static class UITestHelper
{
public static bool IsWindowClosedException(this Exception exc)
{
-#if __WINDOWS__
+#if WINDOWS
return exc.Message?.Contains("Currently selected window has been closed") ?? false;
#else
return false;
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1704.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1704.cs
index 1cbbd5cf9233..fa62f79de7b4 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1704.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1704.cs
@@ -490,7 +490,7 @@ public MiscPage()
int.TryParse(_stressTestItertionEntry.Text, out _stressTestIterationCount);
-#if __UWP__
+#if WINDOWS
Task.Run(runStressTest);
#else
ThreadPool.QueueUserWorkItem(delegate
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1777.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1777.cs
index d6c573757346..40bb71fb8300 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1777.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1777.cs
@@ -83,7 +83,7 @@ void button_Clicked(object sender, EventArgs e)
_pickerNormal.Items.Add("test " + _pickerNormal.Items.Count);
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void Issue1777Test()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1937.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1937.cs
index b9df16e7980a..54b8ff6c9e74 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1937.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue1937.cs
@@ -92,7 +92,7 @@ protected override void Init()
};
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void Issue1937Test ()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2339.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2339.cs
index c9c6d7a5063c..9dad86b9d602 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2339.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2339.cs
@@ -84,7 +84,7 @@ protected override void Init()
#if UITEST
[Test]
-#if __WINDOWS__
+#if WINDOWS
[Ignore("Focus Behavior is different on UWP")]
#endif
public void FocusAndUnFocusMultipleTimes()
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2399.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2399.cs
index 3c3e78c8ecce..42bb5b24824a 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2399.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2399.cs
@@ -15,7 +15,7 @@ namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2399, "Label Renderer Dispose never called")]
-#if __WINDOWS__
+#if WINDOWS
// this test works fine when ran manually but when executed through the test runner
// it fails. Not sure the difference
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.ManualReview)]
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2809.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2809.cs
index 5def3e50233f..13ac49a6a570 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2809.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2809.cs
@@ -47,7 +47,7 @@ void ShouldShowMenu()
#if __ANDROID__
//show secondary menu
RunningApp.TapOverflowMenuButton();
-#elif __WINDOWS__
+#elif WINDOWS
RunningApp.Tap ("MoreButton");
#endif
}
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2894.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2894.cs
index f53b62502987..cd68ded450bf 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2894.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2894.cs
@@ -250,7 +250,7 @@ public void VariousSpanGesturePermutation()
do
{
-#if __WINDOWS__
+#if WINDOWS
RunningApp.TapCoordinates(target.X + target.Width - 10, target.Y + 2);
#else
RunningApp.TapCoordinates(target.X + target.CenterX, target.Y + 2);
@@ -267,7 +267,7 @@ public void VariousSpanGesturePermutation()
RunningApp.Tap($"TestSpan5");
RunningApp.TapCoordinates(target.X + 5, target.Y + 5);
-#if __WINDOWS__
+#if WINDOWS
RunningApp.TapCoordinates(target.X + target.Width - 10, target.Y + 2);
#else
RunningApp.TapCoordinates(target.X + target.CenterX, target.Y + 2);
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2981.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2981.cs
index 449e02833d1c..176c77ae2c57 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2981.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue2981.cs
@@ -26,7 +26,7 @@ protected override void Init()
Content = listView;
}
-#if UITEST && !__WINDOWS__
+#if UITEST && !WINDOWS
// This test won't work on Windows right now because we can only test desktop, so touch events
// (like LongPress) don't really work. The test should work manually on a touch screen, though.
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3139.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3139.cs
index cadc03f42550..75bebeb4fa7f 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3139.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3139.cs
@@ -44,7 +44,7 @@ protected override async void Init()
await alertTask;
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void Issue3139Test ()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3652.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3652.cs
index 14539c04d8dc..7b9a64772567 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3652.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3652.cs
@@ -114,7 +114,7 @@ public class ListItemViewModel
new Command(() => MessagingCenter.Send(this, "Remove", this));
}
-#if UITEST && !__WINDOWS__
+#if UITEST && !WINDOWS
[Test]
public void TestRemovingContextMenuItems()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3840.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3840.cs
index 3addb02634ce..d63b281e9f43 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3840.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue3840.cs
@@ -87,7 +87,7 @@ public void TranslatingViewKeepsScrollViewPosition()
RunningApp.WaitForElement(_failedText);
RunningApp.Tap(_button1);
RunningApp.Tap(_button2);
-#if __WINDOWS__
+#if WINDOWS
var label = RunningApp.WaitForElement(_failedText);
Assert.AreEqual(0, label[0].Rect.Height);
Assert.AreEqual(0, label[0].Rect.Width);
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue4597.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue4597.cs
index 587e820ea062..d1dd63b462e4 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue4597.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue4597.cs
@@ -173,7 +173,7 @@ protected override void Init()
}
#if UITEST
-#if !__WINDOWS__
+#if !WINDOWS
[Test]
public void ImageFromFileSourceAppearsAndDisappearsCorrectly()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5412.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5412.cs
index cc474f2c425b..b586da07927c 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5412.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5412.cs
@@ -25,7 +25,7 @@ protected override async void Init()
await Navigation.PushModalAsync(new Issue5412MainPage());
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void Issue5412Test()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5886.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5886.cs
index 153d17f7e692..c43427fd82ec 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5886.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue5886.cs
@@ -79,7 +79,7 @@ void Button_Clicked1(object sender, EventArgs e)
button1.IsVisible = true;
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void ReplaceRenderer()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue6323.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue6323.cs
index f5ae1415403b..eec97bd03e4e 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue6323.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue6323.cs
@@ -27,7 +27,7 @@ protected override void Init()
});
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
[Test]
public void Issue6323Test()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7167.xaml.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7167.xaml.cs
index 907936545e14..5216920205d0 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7167.xaml.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7167.xaml.cs
@@ -6,7 +6,7 @@
using Microsoft.Maui.Controls.CustomAttributes;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Xaml;
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
using Xamarin.UITest;
using Microsoft.Maui.Controls.Compatibility.UITests;
using NUnit.Framework;
@@ -40,7 +40,7 @@ void MyListView_OnItemSelected(object sender, SelectedItemChangedEventArgs e)
}
-#if UITEST && __WINDOWS__
+#if UITEST && WINDOWS
const string ListViewId = "ListViewId";
const string AddCommandID = "AddCommandID";
const string ClearListCommandId = "ClearListCommandId";
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7181.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7181.cs
index 1f75166b50da..d1b2dfc83a42 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7181.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue7181.cs
@@ -60,7 +60,7 @@ protected override void Init()
private void OnToolbarClicked() =>
_toolbarItem.Text = $"{AfterClickToolbarItemText} {_clicks++}";
-#if UITEST && (__ANDROID__ || __WINDOWS__)
+#if UITEST && (__ANDROID__ || WINDOWS)
[Test]
public void ShellToolbarItemTests()
{
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue8821.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue8821.cs
index a4bbbbe6ef63..14fe4e0d5b6c 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/Issue8821.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/Issue8821.cs
@@ -74,13 +74,7 @@ async Task CreateImage(string imageUrl)
{
var bytes = await DownloadImageAsync(imageUrl);
- string path;
-
-#if WINDOWS_UWP
- path = Windows.Storage.ApplicationData.Current.LocalFolder.Path;
-#else
- path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
-#endif
+ string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
SecondImageSource = IOPath.Combine(path, "Issue8821.gif");
File.WriteAllBytes(SecondImageSource, bytes);
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/ScreenshotConditionalApp.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/ScreenshotConditionalApp.cs
index b6ce01d895d3..357f5f68a7d9 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/ScreenshotConditionalApp.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/ScreenshotConditionalApp.cs
@@ -221,7 +221,7 @@ public void WaitFor(Func predicate, string timeoutMessage = "Timed out wai
public AppResult WaitForFirstElement(string marked, string timeoutMessage = "Timed out waiting for element...",
TimeSpan? timeout = null, TimeSpan? retryFrequency = null)
{
-#if __WINDOWS__
+#if WINDOWS
return (_app as WinDriverApp).WaitForFirstElement(marked, timeoutMessage, timeout, retryFrequency);
#else
return _app.WaitForElement(marked, timeoutMessage, timeout, retryFrequency).FirstOrDefault();
@@ -463,7 +463,7 @@ public ITestServer TestServer
get { return _app.TestServer; }
}
-#if __WINDOWS__
+#if WINDOWS
public string ReadDatePicker(string marked)
{
return ((WinDriverApp)_app).ReadDatePicker(marked).ToString();
@@ -490,7 +490,7 @@ public void TestSetup(Type testType, bool isolate)
UITestHelper.MarkTestInconclusiveIfNoInternetConnectionIsPresent(testType, _app);
-#if __WINDOWS__
+#if WINDOWS
RestartIfAppIsClosed();
#endif
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/TestPages.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/TestPages.cs
index bacc0592a11d..77fa1324e935 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/TestPages.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/TestPages/TestPages.cs
@@ -55,7 +55,7 @@ static IApp InitializeApp()
Xamarin.UITest.Desktop.TestAgent.Start();
app = InitializeMacOSApp();
-#elif __WINDOWS__
+#elif WINDOWS
app = InitializeUWPApp();
#endif
if (app == null)
@@ -144,7 +144,7 @@ static IApp InitializeMacOSApp()
}
#endif
-#if __WINDOWS__
+#if WINDOWS
static IApp InitializeUWPApp()
{
return WindowsTestBase.ConfigureApp();
@@ -170,7 +170,7 @@ public static void NavigateToIssue(Type type, IApp app)
int maxAttempts = 2;
int attempts = 0;
-#if __WINDOWS__
+#if WINDOWS
bool attemptOneRestart = false;
bool waitNoElementAttempt = false;
#endif
@@ -195,7 +195,7 @@ public static void NavigateToIssue(Type type, IApp app)
}
#endif
-#if __WINDOWS__
+#if WINDOWS
// Windows doens't have an 'invoke' option right now for us to do the more direct navigation
// we're using for Android/iOS
// So we're just going to use the 'Reset' method to bounce the app to the opening screen
@@ -223,7 +223,7 @@ public static void NavigateToIssue(Type type, IApp app)
app.WaitForElement(q => q.Raw("* marked:'SearchButton'"));
app.Tap(q => q.Raw("* marked:'SearchButton'"));
-#if __WINDOWS__
+#if WINDOWS
try
{
if (!waitNoElementAttempt)
@@ -243,7 +243,7 @@ public static void NavigateToIssue(Type type, IApp app)
if (!app.RestartIfAppIsClosed())
return;
}
-#if __WINDOWS__
+#if WINDOWS
catch (Exception we)
when (we.IsWindowClosedException() && !attemptOneRestart)
{
@@ -573,7 +573,7 @@ public virtual void TearDown()
public abstract class TestShell : Shell
{
protected const string FlyoutIconAutomationId = "OK";
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
protected const string BackButtonAutomationId = "Back";
#else
protected const string BackButtonAutomationId = "OK";
@@ -828,7 +828,7 @@ public void TapBackArrow(string backArrowIcon = BackButtonAutomationId)
public void TapInFlyout(string text, string flyoutIcon = FlyoutIconAutomationId, bool usingSwipe = false, string timeoutMessage = null, bool makeSureFlyoutStaysOpen = false)
{
timeoutMessage = timeoutMessage ?? text;
-#if __WINDOWS__
+#if WINDOWS
RunningApp.WaitForElement(flyoutIcon);
#endif
diff --git a/src/Compatibility/ControlGallery/src/Issues.Shared/VisualControlsPage.xaml.cs b/src/Compatibility/ControlGallery/src/Issues.Shared/VisualControlsPage.xaml.cs
index e72b73e0539c..3627f7f2d728 100644
--- a/src/Compatibility/ControlGallery/src/Issues.Shared/VisualControlsPage.xaml.cs
+++ b/src/Compatibility/ControlGallery/src/Issues.Shared/VisualControlsPage.xaml.cs
@@ -38,7 +38,7 @@ protected override void Init()
{
}
-#if UITEST && !__WINDOWS__
+#if UITEST && !WINDOWS
[Test]
public void LoadingVisualGalleryPageDoesNotCrash()
{
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/BaseTestFixture.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/BaseTestFixture.cs
index f14bb96c7db2..f6c7274b187e 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/BaseTestFixture.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/BaseTestFixture.cs
@@ -108,7 +108,7 @@ protected void ResetApp()
#if __ANDROID__
App.Invoke("Reset");
#endif
-#if __WINDOWS__
+#if WINDOWS
WindowsTestBase.Reset();
#endif
}
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/PlatformQueries.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/PlatformQueries.cs
index c7fcfb18616f..b1bb682c437d 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/PlatformQueries.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/PlatformQueries.cs
@@ -29,7 +29,7 @@ internal static class PlatformMethodQueries
{ View.ScaleProperty, Tuple.Create (new[] { "getLayerTransformString" }, true) },
};
-#elif __ANDROID__ || __WINDOWS__
+#elif __ANDROID__ || WINDOWS
public static readonly Dictionary> PropertyPlatformMethodDictionary = new Dictionary
>
{
@@ -86,7 +86,7 @@ internal static class PlatformViews
public static readonly string TableView = "UITableView";
public static readonly string TimePicker = "UITextField";
public static readonly string WebView = "WKWebView";
-#elif __ANDROID__ || __WINDOWS__
+#elif __ANDROID__ || WINDOWS
public static readonly string ActivityIndicator = "android.widget.ProgressBar";
public static readonly string BoxView = "xamarin.forms.platform.android.BoxRenderer";
public static readonly string Button = "android.widget.Button";
@@ -124,7 +124,7 @@ internal static class PlatformQueries
public static readonly Func PageWithoutNavigationBar = q => q.Raw("*").Index(7);
public static readonly Func NavigationBarBackButton = q => q.Class("UINavigationItemButtonView");
-#elif __ANDROID__ || __WINDOWS__
+#elif __ANDROID__ || WINDOWS
public static readonly Func Root = q => q.Id("content");
public static readonly Func RootPageListView = q => q.Raw("ListViewRenderer index:0");
public static readonly Func GalleryListView = q => q.Raw("ListViewRenderer index:1");
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Queries.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Queries.cs
index 019c34a37d77..5d488eb216ac 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Queries.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Queries.cs
@@ -112,7 +112,7 @@ internal static class Rects
{
public static AppRect RootViewRect(this IApp app)
{
-#if __WINDOWS__
+#if WINDOWS
return app.Query(WinDriverApp.AppName)[0].Rect;
#else
return app.Query(q => q.Raw("* index:0"))[0].Rect;
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActionSheetUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActionSheetUITests.cs
index 9d78d28062bd..c5cb97532539 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActionSheetUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActionSheetUITests.cs
@@ -163,7 +163,7 @@ void ScrollAndTap(string actionSheet)
{
var queryString = $"* text:'{actionSheet}'";
Func actionSheetQuery = q => q.Raw(queryString);
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(actionSheetQuery);
#elif __MACOS__
App.Tap(actionSheetQuery);
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActivityIndicatorUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActivityIndicatorUITests.cs
index 88861cb41f8e..b894baf49fbc 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActivityIndicatorUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ActivityIndicatorUITests.cs
@@ -55,7 +55,7 @@ public void IsRunning()
remote.GoTo();
#if __MACOS__
Assert.Inconclusive("Not tested yet");
-#elif __WINDOWS__
+#elif WINDOWS
Assert.Inconclusive(PleaseInspect);
#else
var isRunning = remote.GetProperty(ActivityIndicator.IsRunningProperty);
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/BoxViewUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/BoxViewUITests.cs
index dc69cd782ef3..e1538febcc81 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/BoxViewUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/BoxViewUITests.cs
@@ -54,12 +54,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -78,7 +78,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ButtonUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ButtonUITests.cs
index 83ac4ad2bf25..acfe0e97aa86 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ButtonUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ButtonUITests.cs
@@ -179,12 +179,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -203,7 +203,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CheckBoxUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CheckBoxUITests.cs
index 4e2a7a753801..0cb41e3dc55a 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CheckBoxUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/CheckBoxUITests.cs
@@ -50,12 +50,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -74,7 +74,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/DatePickerUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/DatePickerUITests.cs
index f6681fee35c8..a0e71bb479ed 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/DatePickerUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/DatePickerUITests.cs
@@ -52,12 +52,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -76,7 +76,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EditorUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EditorUITests.cs
index b081f036b254..716670de53df 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EditorUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EditorUITests.cs
@@ -52,12 +52,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -76,7 +76,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EntryUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EntryUITests.cs
index 2ae896be04ef..436d80b34d8c 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EntryUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/EntryUITests.cs
@@ -103,12 +103,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -127,7 +127,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/FrameUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/FrameUITests.cs
index b69d5a22fc89..37507a847a7f 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/FrameUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/FrameUITests.cs
@@ -54,12 +54,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -78,7 +78,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageButtonUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageButtonUITests.cs
index d00695ab57a2..3df1e10b90fc 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageButtonUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageButtonUITests.cs
@@ -161,12 +161,12 @@ public void Image()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -185,7 +185,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageUITests.cs
index 7492cc948d6f..825abca6981b 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ImageUITests.cs
@@ -58,12 +58,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -82,7 +82,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/LabelUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/LabelUITests.cs
index 5fcaecca38f4..f9a748694c37 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/LabelUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/LabelUITests.cs
@@ -51,12 +51,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -75,7 +75,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/Legacy-CellsUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/Legacy-CellsUITests.cs
index d6ca8beac60f..58a9f48bdad5 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/Legacy-CellsUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/Legacy-CellsUITests.cs
@@ -27,7 +27,7 @@ protected override void NavigateToGallery()
void SelectTest(string testName)
{
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(testName);
#else
App.ScrollForElement($"* marked:'{testName}'",
@@ -58,7 +58,7 @@ public void CellsGalleryTextCellList()
string target = "Detail 99";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(1));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -84,7 +84,7 @@ public void CellsGalleryTextCellTable()
string target = "Detail 12";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(1));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -114,7 +114,7 @@ public void CellsGalleryImageCellList()
string target = "Detail 99";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(3));
#else
var scrollBounds = App.Query(q => q.Marked(CellTestContainerId)).First().Rect;
@@ -126,7 +126,7 @@ public void CellsGalleryImageCellList()
App.Screenshot("All ImageCells are present");
-#if !__WINDOWS__
+#if !WINDOWS
var numberOfImages = App.Query(q => q.Raw(PlatformViews.Image)).Length;
// Check that there are images present. In Android,
// have to make sure that there are more than 2 for navigation.
@@ -188,7 +188,7 @@ public void CellsGalleryImageCellTable()
string target = "Detail 12";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(1));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -199,7 +199,7 @@ public void CellsGalleryImageCellTable()
App.Screenshot("All ImageCells are present");
-#if !__WINDOWS__
+#if !WINDOWS
var numberOfImages = App.Query(q => q.Raw(PlatformViews.Image)).Length;
// Check that there are images present. In Android,
// have to make sure that there are more than 2 for navigation.
@@ -223,7 +223,7 @@ public void CellsGallerySwitchCellList()
string target = "Label 99";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(1));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -252,7 +252,7 @@ public void CellsGallerySwitchCellTable()
string target = "text 32";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(1));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -281,7 +281,7 @@ public void CellsGalleryEntryCellList()
string target = "Label 99";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(3));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -305,7 +305,7 @@ public void CellsGalleryEntryCellTable()
string target = "Text 32";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(1));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -329,7 +329,7 @@ public void CellsGalleryEntryCellCompleted()
string target = "Enter text";
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(target, CellTestContainerId, timeout: TimeSpan.FromMinutes(1));
#else
App.ScrollForElement($"* marked:'{target}'",
@@ -340,7 +340,7 @@ public void CellsGalleryEntryCellCompleted()
App.Screenshot("Before clicking Entry");
-#if !__IOS__ && !__WINDOWS__
+#if !__IOS__ && !WINDOWS
App.Tap(PlatformQueries.EntryCellWithPlaceholder("I am a placeholder"));
App.EnterText(PlatformQueries.EntryCellWithPlaceholder("I am a placeholder"), "Hi");
App.Screenshot("Entered Text");
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/PickerUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/PickerUITests.cs
index b1810c0a3c10..12f5c179b22b 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/PickerUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/PickerUITests.cs
@@ -44,12 +44,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -68,7 +68,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ProgressBarUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ProgressBarUITests.cs
index 7262c70bf659..4204c33f6aaa 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ProgressBarUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ProgressBarUITests.cs
@@ -51,12 +51,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -75,7 +75,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RadioButtonUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RadioButtonUITests.cs
index 9fe5cfb88aa7..4c38c3b119e5 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RadioButtonUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RadioButtonUITests.cs
@@ -55,12 +55,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -79,7 +79,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RootGalleryUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RootGalleryUITests.cs
index 56398f0010ec..951ef8d3a5ec 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RootGalleryUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/RootGalleryUITests.cs
@@ -73,7 +73,7 @@ public void VisitEachPage()
{
foreach (var page in rootPages)
{
-#if __WINDOWS__
+#if WINDOWS
App.ScrollDownTo(page.ButtonId, "ChoosePageScrollView");
#else
var scrollViewArea = App.Query(q => q.Marked("ChoosePageScrollView")).First().Rect;
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SearchBarUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SearchBarUITests.cs
index c15fe49de9e0..b56ab41e0b67 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SearchBarUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SearchBarUITests.cs
@@ -42,12 +42,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -66,7 +66,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SliderUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SliderUITests.cs
index 335127cfae76..16c4b585a26e 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SliderUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SliderUITests.cs
@@ -50,12 +50,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -74,7 +74,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/StepperUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/StepperUITests.cs
index 7020b6f3b50b..58aed059744a 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/StepperUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/StepperUITests.cs
@@ -37,7 +37,7 @@ public override void _UnFocus()
{
}
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
#endif
[Category(UITestCategories.UwpIgnore)]
@@ -71,7 +71,7 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -90,7 +90,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SwitchUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SwitchUITests.cs
index ce7aaf859342..ac819e19ca47 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SwitchUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/SwitchUITests.cs
@@ -50,12 +50,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -74,7 +74,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/TimePickerUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/TimePickerUITests.cs
index 785225f67137..d8391fa52b35 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/TimePickerUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/TimePickerUITests.cs
@@ -53,12 +53,12 @@ protected override void FixtureTeardown()
public override void _Opacity() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _IsEnabled() { }
#endif
-#if __ANDROID__ || __IOS__ || __WINDOWS__
+#if __ANDROID__ || __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Rotation() { }
@@ -77,7 +77,7 @@ public override void _TranslationX() { }
public override void _TranslationY() { }
#endif
-#if __IOS__ || __WINDOWS__
+#if __IOS__ || WINDOWS
[Ignore("This is covered by the platform tests")]
public override void _Scale() { }
#endif
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ViewUITests.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ViewUITests.cs
index fc5c149c0786..004790ef6c92 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ViewUITests.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Tests/ViewUITests.cs
@@ -127,7 +127,7 @@ public virtual void _Opacity()
remote.GoTo();
#if __MACOS__
Assert.Inconclusive("needs testing");
-#elif __WINDOWS__
+#elif WINDOWS
Assert.Inconclusive(PleaseInspect);
#else
float opacity = -1f;
@@ -154,7 +154,7 @@ public virtual void _Rotation()
Matrix generatedMatrix = NumericExtensions.CalculateRotationMatrixForDegrees(10, Axis.Z);
Assert.AreEqual(generatedMatrix, rotationMatrix);
#endif
-#if __WINDOWS__
+#if WINDOWS
Assert.Inconclusive(PleaseInspect);
#endif
}
@@ -176,7 +176,7 @@ public virtual void _RotationX()
Matrix matrix = NumericExtensions.CalculateRotationMatrixForDegrees(33.0f, Axis.X);
Assert.AreEqual(matrix, rotationXMatrix);
#endif
-#if __WINDOWS__
+#if WINDOWS
Assert.Inconclusive(PleaseInspect);
#endif
}
@@ -198,7 +198,7 @@ public virtual void _RotationY()
Matrix matrix = NumericExtensions.CalculateRotationMatrixForDegrees(10.0f, Axis.Y);
Assert.AreEqual(matrix, rotationYMatrix);
#endif
-#if __WINDOWS__
+#if WINDOWS
Assert.Inconclusive(PleaseInspect);
#endif
}
@@ -213,7 +213,7 @@ public virtual void _Scale()
#if __MACOS__
Assert.Inconclusive("needs testing");
#else
-#if __WINDOWS__
+#if WINDOWS
Assert.Inconclusive(PleaseInspect);
#endif
var scaleMatrix = remote.GetProperty(View.ScaleProperty);
@@ -230,7 +230,7 @@ public virtual void _TranslationX()
{
var remote = new ViewContainerRemote(App, Test.VisualElement.TranslationX, PlatformViewType);
remote.GoTo();
-#if __WINDOWS__
+#if WINDOWS
Assert.Inconclusive(PleaseInspect);
#endif
}
@@ -243,7 +243,7 @@ public virtual void _TranslationY()
{
var remote = new ViewContainerRemote(App, Test.VisualElement.TranslationY, PlatformViewType);
remote.GoTo();
-#if __WINDOWS__
+#if WINDOWS
Assert.Inconclusive(PleaseInspect);
#endif
}
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/AppExtensions.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/AppExtensions.cs
index 5f0e86729333..9b60d93aff09 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/AppExtensions.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/AppExtensions.cs
@@ -17,7 +17,7 @@ namespace Microsoft.Maui.Controls.Compatibility.UITests
using IApp = global::Xamarin.UITest.IApp;
internal static class AppExtensions
{
-#if __WINDOWS__
+#if WINDOWS
public static void Restart(this IApp app)
{
((ScreenshotConditionalApp)app).Restart();
@@ -25,7 +25,7 @@ public static void Restart(this IApp app)
#endif
public static bool RestartIfAppIsClosed(this IApp app)
{
-#if __WINDOWS__
+#if WINDOWS
return ((ScreenshotConditionalApp)app).RestartIfAppIsClosed();
#else
return false;
@@ -165,7 +165,7 @@ public static void SendAppToBackground(this IApp app, TimeSpan timeSpan)
public static string ReadDatePicker(this IApp app, string marked)
{
-#if __WINDOWS__
+#if WINDOWS
return ((ScreenshotConditionalApp)app).ReadDatePicker(marked).ToString();
#else
return app.WaitForElement(marked)[0].ReadText();
@@ -174,7 +174,7 @@ public static string ReadDatePicker(this IApp app, string marked)
public static string ReadTimePicker(this IApp app, string marked)
{
-#if __WINDOWS__
+#if WINDOWS
return ((ScreenshotConditionalApp)app).ReadTimePicker(marked).ToString();
#else
return app.WaitForElement(marked)[0].ReadText();
diff --git a/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/Gestures.cs b/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/Gestures.cs
index 42bbdda9717d..378251dcdd25 100644
--- a/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/Gestures.cs
+++ b/src/Compatibility/ControlGallery/src/UITests.Shared/Utilities/Gestures.cs
@@ -108,7 +108,7 @@ public static void ActivateContextMenu(this IApp app, string target)
rect.CenterY);
#elif __ANDROID__
app.TouchAndHold(target);
-#elif __WINDOWS__
+#elif WINDOWS
// Since we know we're on desktop for the moment, just use ContextClick. If we get this running
// on actual touch devices at some point, we'll need to check for that and use TouchAndHold
app.Invoke("ContextClick", target);
@@ -123,7 +123,7 @@ public static void DismissContextMenu(this IApp app)
app.TapCoordinates(screenbounds.CenterX, screenbounds.CenterY);
#elif __ANDROID__
app.Back();
-#elif __WINDOWS__
+#elif WINDOWS
var screenbounds = app.RootViewRect();
app.TapCoordinates (screenbounds.CenterX, screenbounds.CenterY);
#endif
diff --git a/src/Compatibility/ControlGallery/src/WinUI/CustomRenderers.cs b/src/Compatibility/ControlGallery/src/WinUI/CustomRenderers.cs
index 923d65d8786b..973315d26946 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/CustomRenderers.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/CustomRenderers.cs
@@ -11,6 +11,7 @@
using Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI;
using Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
[assembly: ExportRenderer(typeof(Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues.Bugzilla42602.TextBoxView), typeof(Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI.TextBoxViewRenderer))]
[assembly: ExportRenderer(typeof(Issue1683.EntryKeyboardFlags), typeof(EntryRendererKeyboardFlags))]
diff --git a/src/Compatibility/ControlGallery/src/WinUI/CustomSwitchRenderer.cs b/src/Compatibility/ControlGallery/src/WinUI/CustomSwitchRenderer.cs
index e79d9fc84e0d..09fef243c15e 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/CustomSwitchRenderer.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/CustomSwitchRenderer.cs
@@ -4,6 +4,7 @@
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
using WResourceDictionary = Microsoft.UI.Xaml.ResourceDictionary;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
[assembly: ExportRenderer(typeof(CustomSwitch), typeof(CustomSwitchRenderer))]
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI
diff --git a/src/Compatibility/ControlGallery/src/WinUI/MainPage.xaml.cs b/src/Compatibility/ControlGallery/src/WinUI/MainPage.xaml.cs
index f5ad33f7eed9..eadf9bdad045 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/MainPage.xaml.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/MainPage.xaml.cs
@@ -15,6 +15,7 @@
using Microsoft.Maui.Controls.Compatibility.ControlGallery;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI
{
diff --git a/src/Compatibility/ControlGallery/src/WinUI/NavPageOverrideRenderer.cs b/src/Compatibility/ControlGallery/src/WinUI/NavPageOverrideRenderer.cs
index a771bff79e05..93ba48ea5ee1 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/NavPageOverrideRenderer.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/NavPageOverrideRenderer.cs
@@ -4,6 +4,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Controls.Platform;
[assembly: ExportRenderer(typeof(NavPageOverrideUWP.CustomNavPageForOverride), typeof(NavPageOverrideRenderer))]
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI
diff --git a/src/Compatibility/ControlGallery/src/WinUI/_2489CustomRenderer.cs b/src/Compatibility/ControlGallery/src/WinUI/_2489CustomRenderer.cs
index 994ccd5979ea..dfbc5f7b0fdd 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/_2489CustomRenderer.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/_2489CustomRenderer.cs
@@ -3,6 +3,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
+using Microsoft.Maui.Controls.Platform;
[assembly: ExportRenderer(typeof(Microsoft.Maui.Controls.Page), typeof(_2489CustomRenderer))]
namespace Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI
diff --git a/src/Compatibility/ControlGallery/src/WinUI/_57114Renderer.cs b/src/Compatibility/ControlGallery/src/WinUI/_57114Renderer.cs
index fa159f262fb6..a47d5becd6a6 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/_57114Renderer.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/_57114Renderer.cs
@@ -4,6 +4,7 @@
using Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
[assembly: ExportRenderer(typeof(Bugzilla57114._57114View), typeof(_57114Renderer))]
diff --git a/src/Compatibility/ControlGallery/src/WinUI/_60122ImageRenderer.cs b/src/Compatibility/ControlGallery/src/WinUI/_60122ImageRenderer.cs
index 4c47665f99d3..bc12e82d9009 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/_60122ImageRenderer.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/_60122ImageRenderer.cs
@@ -4,6 +4,7 @@
using Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI;
using Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
+using Microsoft.Maui.Controls.Platform;
[assembly: ExportRenderer(typeof(Bugzilla60122._60122Image), typeof(_60122ImageRenderer))]
diff --git a/src/Compatibility/ControlGallery/src/WinUI/_9087CustomRenderer.cs b/src/Compatibility/ControlGallery/src/WinUI/_9087CustomRenderer.cs
index 9ae2b122fc22..3c1be43f7518 100644
--- a/src/Compatibility/ControlGallery/src/WinUI/_9087CustomRenderer.cs
+++ b/src/Compatibility/ControlGallery/src/WinUI/_9087CustomRenderer.cs
@@ -1,6 +1,7 @@
using System;
using Microsoft.Maui.Controls.Compatibility.ControlGallery.WinUI;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
+using Microsoft.Maui.Controls.Platform;
using static Microsoft.Maui.Controls.Compatibility.ControlGallery.Issues.Issue9087;
[assembly: ExportRenderer(typeof(_9087Label), typeof(_9087CustomRenderer))]
diff --git a/src/Compatibility/ControlGallery/test/WinUI.UITests/WinUI.UITests.csproj b/src/Compatibility/ControlGallery/test/WinUI.UITests/WinUI.UITests.csproj
index 23c9fabcc6fa..b7b9d2a2d44a 100644
--- a/src/Compatibility/ControlGallery/test/WinUI.UITests/WinUI.UITests.csproj
+++ b/src/Compatibility/ControlGallery/test/WinUI.UITests/WinUI.UITests.csproj
@@ -18,7 +18,7 @@
full
false
bin\Debug\
- TRACE;DEBUG;__WINDOWS__;UITEST
+ TRACE;DEBUG;WINDOWS;WINDOWS;UITEST
prompt
4
0114;0108;4014;0649;0169;0168;0219
@@ -27,7 +27,7 @@
pdbonly
true
bin\Release\
- TRACE;__WINDOWS__;UITEST
+ TRACE;WINDOWS;UITEST
prompt
4
0114;0108;4014;0649;0169;0168;0219
diff --git a/src/Compatibility/Core/src/Android/AppCompat/FormsAppCompatActivity.cs b/src/Compatibility/Core/src/Android/AppCompat/FormsAppCompatActivity.cs
index b8368dcdc4c7..e467db2e41e1 100644
--- a/src/Compatibility/Core/src/Android/AppCompat/FormsAppCompatActivity.cs
+++ b/src/Compatibility/Core/src/Android/AppCompat/FormsAppCompatActivity.cs
@@ -241,7 +241,7 @@ void OnCreate(
SetContentView(_layout);
Profile.FramePartition("OnStateChanged");
- Microsoft.Maui.Controls.Application.ClearCurrent();
+ Microsoft.Maui.Controls.Application.Current = null;
_previousState = _currentState;
_currentState = AndroidApplicationLifecycleState.OnCreate;
diff --git a/src/Compatibility/Core/src/Android/RendererToHandlerShim.cs b/src/Compatibility/Core/src/Android/RendererToHandlerShim.cs
index 2f4062aafae9..d4ef1cd24b1c 100644
--- a/src/Compatibility/Core/src/Android/RendererToHandlerShim.cs
+++ b/src/Compatibility/Core/src/Android/RendererToHandlerShim.cs
@@ -22,7 +22,7 @@ public static IViewHandler CreateShim(object renderer)
return new RendererToHandlerShim();
}
- public RendererToHandlerShim() : base(Handlers.ViewHandler.ViewMapper)
+ public RendererToHandlerShim() : base(ViewHandler.ViewMapper)
{
}
diff --git a/src/Compatibility/Core/src/Compatibility-net6.csproj b/src/Compatibility/Core/src/Compatibility-net6.csproj
index 552c28389a8f..72567da76797 100644
--- a/src/Compatibility/Core/src/Compatibility-net6.csproj
+++ b/src/Compatibility/Core/src/Compatibility-net6.csproj
@@ -15,7 +15,7 @@
$(NoWarn);CA1416;CS8305
- $(DefineConstants);WINDOWS_UWP;WINDOWS
+ $(DefineConstants);WINDOWS
win10-x86;win10-x64;win10-arm64
diff --git a/src/Compatibility/Core/src/WinUI/AccessibilityExtensions.cs b/src/Compatibility/Core/src/WinUI/AccessibilityExtensions.cs
index d7dc9c07763e..32b334ac86ab 100644
--- a/src/Compatibility/Core/src/WinUI/AccessibilityExtensions.cs
+++ b/src/Compatibility/Core/src/WinUI/AccessibilityExtensions.cs
@@ -6,91 +6,6 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
public static class AccessibilityExtensions
{
- public static void SetAutomationPropertiesAutomationId(this FrameworkElement Control, string id)
- {
- Control.SetValue(NativeAutomationProperties.AutomationIdProperty, id);
- }
-
- public static string SetAutomationPropertiesName(this FrameworkElement Control, Element Element, string _defaultAutomationPropertiesName = null)
- {
- if (Element == null)
- return _defaultAutomationPropertiesName;
-
- if (_defaultAutomationPropertiesName == null)
- _defaultAutomationPropertiesName = (string)Control.GetValue(NativeAutomationProperties.NameProperty);
-
- var elemValue = (string)Element.GetValue(AutomationProperties.NameProperty);
-
- if (!string.IsNullOrWhiteSpace(elemValue))
- Control.SetValue(NativeAutomationProperties.NameProperty, elemValue);
- else
- Control.SetValue(NativeAutomationProperties.NameProperty, _defaultAutomationPropertiesName);
-
- return _defaultAutomationPropertiesName;
- }
-
- public static AccessibilityView? SetAutomationPropertiesAccessibilityView(this FrameworkElement Control, Element Element, AccessibilityView? _defaultAutomationPropertiesAccessibilityView = null)
- {
- if (Element == null)
- return _defaultAutomationPropertiesAccessibilityView;
-
- if (!_defaultAutomationPropertiesAccessibilityView.HasValue)
- _defaultAutomationPropertiesAccessibilityView = (AccessibilityView)Control.GetValue(NativeAutomationProperties.AccessibilityViewProperty);
-
- var newValue = _defaultAutomationPropertiesAccessibilityView;
-
- var elemValue = (bool?)Element.GetValue(AutomationProperties.IsInAccessibleTreeProperty);
-
- if (elemValue == true)
- newValue = AccessibilityView.Content;
- else if (elemValue == false)
- newValue = AccessibilityView.Raw;
-
- Control.SetValue(NativeAutomationProperties.AccessibilityViewProperty, newValue);
-
- return _defaultAutomationPropertiesAccessibilityView;
-
- }
- public static string SetAutomationPropertiesHelpText(this FrameworkElement Control, Element Element, string _defaultAutomationPropertiesHelpText = null)
- {
- if (Element == null)
- return _defaultAutomationPropertiesHelpText;
-
- if (_defaultAutomationPropertiesHelpText == null)
- _defaultAutomationPropertiesHelpText = (string)Control.GetValue(NativeAutomationProperties.HelpTextProperty);
-
- var elemValue = (string)Element.GetValue(AutomationProperties.HelpTextProperty);
-
- if (!string.IsNullOrWhiteSpace(elemValue))
- Control.SetValue(NativeAutomationProperties.HelpTextProperty, elemValue);
- else
- Control.SetValue(NativeAutomationProperties.HelpTextProperty, _defaultAutomationPropertiesHelpText);
-
- return _defaultAutomationPropertiesHelpText;
- }
-
- public static UIElement SetAutomationPropertiesLabeledBy(this FrameworkElement Control, Element Element, UIElement _defaultAutomationPropertiesLabeledBy = null)
- {
- if (Element == null)
- return _defaultAutomationPropertiesLabeledBy;
-
- if (_defaultAutomationPropertiesLabeledBy == null)
- _defaultAutomationPropertiesLabeledBy = (UIElement)Control.GetValue(NativeAutomationProperties.LabeledByProperty);
-
- var elemValue = (VisualElement)Element.GetValue(AutomationProperties.LabeledByProperty);
-
- var renderer = elemValue?.GetOrCreateRenderer();
-
- var nativeElement = renderer?.GetNativeElement();
-
- if (nativeElement != null)
- Control.SetValue(AutomationProperties.LabeledByProperty, nativeElement);
- else
- Control.SetValue(NativeAutomationProperties.LabeledByProperty, _defaultAutomationPropertiesLabeledBy);
-
- return _defaultAutomationPropertiesLabeledBy;
- }
-
// TODO: This is not having any effect on anything I've tested yet. See if we need it
// after we test the FP and NP w/ back button explicitly enabled.
public static void SetBackButtonTitle(this PageControl Control, Element Element)
@@ -106,7 +21,7 @@ public static void SetBackButtonTitle(this PageControl Control, Element Element)
static string ConcatenateNameAndHint(Element Element)
{
string separator;
-
+
var name = (string)Element.GetValue(AutomationProperties.NameProperty);
var hint = (string)Element.GetValue(AutomationProperties.HelpTextProperty);
@@ -122,17 +37,5 @@ static string ConcatenateNameAndHint(Element Element)
return string.Join(separator, name, hint);
}
-
- internal static void SetAutomationProperties(
- this FrameworkElement frameworkElement,
- Element element,
- string defaultName = null)
- {
- frameworkElement.SetAutomationPropertiesAutomationId(element?.AutomationId);
- frameworkElement.SetAutomationPropertiesName(element, defaultName);
- frameworkElement.SetAutomationPropertiesHelpText(element);
- frameworkElement.SetAutomationPropertiesLabeledBy(element);
- frameworkElement.SetAutomationPropertiesAccessibilityView(element);
- }
}
}
diff --git a/src/Compatibility/Core/src/WinUI/ActivityIndicatorRenderer.cs b/src/Compatibility/Core/src/WinUI/ActivityIndicatorRenderer.cs
index 145c3f2f72db..d29f3fe46077 100644
--- a/src/Compatibility/Core/src/WinUI/ActivityIndicatorRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ActivityIndicatorRenderer.cs
@@ -1,6 +1,7 @@
using System.ComponentModel;
using Microsoft.Maui.Graphics;
using Microsoft.UI.Xaml;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -55,7 +56,7 @@ void UpdateColor()
}
else
{
- Control.Foreground = color.ToBrush();
+ Control.Foreground = Maui.ColorExtensions.ToNative(color);
}
}
diff --git a/src/Compatibility/Core/src/WinUI/BackgroundTracker.cs b/src/Compatibility/Core/src/WinUI/BackgroundTracker.cs
index 5241cf756486..305b79ceaec2 100644
--- a/src/Compatibility/Core/src/WinUI/BackgroundTracker.cs
+++ b/src/Compatibility/Core/src/WinUI/BackgroundTracker.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Graphics;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Media;
@@ -64,7 +65,7 @@ async void UpdateBackground()
Color backgroundColor = Element.BackgroundColor;
if (!backgroundColor.IsDefault())
{
- element.SetValue(_backgroundProperty, backgroundColor.ToBrush());
+ element.SetValue(_backgroundProperty, Maui.ColorExtensions.ToNative(backgroundColor));
}
else
{
diff --git a/src/Compatibility/Core/src/WinUI/BoxViewBorderRenderer.cs b/src/Compatibility/Core/src/WinUI/BoxViewBorderRenderer.cs
index cf6522a67461..df11e4f84f30 100644
--- a/src/Compatibility/Core/src/WinUI/BoxViewBorderRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/BoxViewBorderRenderer.cs
@@ -3,6 +3,7 @@
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml.Controls;
using WShape = Microsoft.UI.Xaml.Shapes.Shape;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -66,7 +67,7 @@ protected override void UpdateBackgroundColor()
backgroundColor = Element.BackgroundColor;
}
- Control.Background = backgroundColor.IsDefault() ? null : backgroundColor.ToBrush();
+ Control.Background = backgroundColor.IsDefault() ? null : Maui.ColorExtensions.ToNative(backgroundColor);
}
protected override void UpdateBackground()
@@ -81,7 +82,7 @@ protected override void UpdateBackground()
Color backgroundColor = Element.BackgroundColor;
if (!backgroundColor.IsDefault())
- Control.Background = backgroundColor.ToBrush();
+ Control.Background = Maui.ColorExtensions.ToNative(backgroundColor);
else
{
if (Element.Color.IsDefault())
@@ -97,7 +98,7 @@ void SetColor(Color color)
if (color.IsDefault())
UpdateBackground();
else
- Control.Background = color.ToBrush();
+ Control.Background = Maui.ColorExtensions.ToNative(color);
}
void SetCornerRadius(CornerRadius cornerRadius)
diff --git a/src/Compatibility/Core/src/WinUI/BrushConverter.cs b/src/Compatibility/Core/src/WinUI/BrushConverter.cs
index 27e3c69ccb23..87d0c308132e 100644
--- a/src/Compatibility/Core/src/WinUI/BrushConverter.cs
+++ b/src/Compatibility/Core/src/WinUI/BrushConverter.cs
@@ -1,4 +1,5 @@
using System;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Graphics;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
@@ -10,7 +11,7 @@ public object Convert(object value, Type targetType, object parameter, string la
var brush = value as Brush;
var color = (Color)parameter;
- return Brush.IsNullOrEmpty(brush) ? color.ToBrush() : brush.ToBrush();
+ return Brush.IsNullOrEmpty(brush) ? Maui.ColorExtensions.ToNative(color) : brush.ToBrush();
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
diff --git a/src/Compatibility/Core/src/WinUI/BrushHelpers.cs b/src/Compatibility/Core/src/WinUI/BrushHelpers.cs
index 5d9b9defaa2d..ec5fd42ccec2 100644
--- a/src/Compatibility/Core/src/WinUI/BrushHelpers.cs
+++ b/src/Compatibility/Core/src/WinUI/BrushHelpers.cs
@@ -1,4 +1,5 @@
using System;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Graphics;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
@@ -32,7 +33,7 @@ public static void UpdateColor(Color color, ref WBrush defaultbrush, Func getter, Action setter)
diff --git a/src/Compatibility/Core/src/WinUI/ButtonRenderer.cs b/src/Compatibility/Core/src/WinUI/ButtonRenderer.cs
index bf7322e7acc9..2f428b27dc8e 100644
--- a/src/Compatibility/Core/src/WinUI/ButtonRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ButtonRenderer.cs
@@ -10,6 +10,7 @@
using WThickness = Microsoft.UI.Xaml.Thickness;
using Microsoft.Maui.Controls.Compatibility.Platform.UAP.Extensions;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -169,14 +170,14 @@ void OnPointerPressed(object sender, RoutedEventArgs e)
void UpdateBackgroundBrush()
{
if (Brush.IsNullOrEmpty(Element.Background))
- Control.BackgroundColor = Element.BackgroundColor.IsNotDefault() ? Element.BackgroundColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBackgroundThemeBrush"];
+ Control.BackgroundColor = Element.BackgroundColor.IsNotDefault() ? Maui.ColorExtensions.ToNative(Element.BackgroundColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBackgroundThemeBrush"];
else
Control.BackgroundColor = Element.Background.ToBrush();
}
void UpdateBorderColor()
{
- Control.BorderBrush = !Element.BorderColor.IsDefault() ? Element.BorderColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBorderThemeBrush"];
+ Control.BorderBrush = !Element.BorderColor.IsDefault() ? Maui.ColorExtensions.ToNative(Element.BorderColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBorderThemeBrush"];
}
void UpdateBorderRadius()
@@ -309,7 +310,7 @@ void UpdateFont()
void UpdateTextColor()
{
- Control.Foreground = Element.TextColor.IsNotDefault() ? Element.TextColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["DefaultTextForegroundThemeBrush"];
+ Control.Foreground = Element.TextColor.IsNotDefault() ? Maui.ColorExtensions.ToNative(Element.TextColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["DefaultTextForegroundThemeBrush"];
}
void UpdatePadding()
diff --git a/src/Compatibility/Core/src/WinUI/CarouselPageRenderer.cs b/src/Compatibility/Core/src/WinUI/CarouselPageRenderer.cs
index d6bc57dcdcae..a175f787f6ae 100644
--- a/src/Compatibility/Core/src/WinUI/CarouselPageRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/CarouselPageRenderer.cs
@@ -6,6 +6,7 @@
using Microsoft.Maui.Controls.Internals;
using WSelectionChangedEventArgs = Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/CheckBoxRenderer.cs b/src/Compatibility/Core/src/WinUI/CheckBoxRenderer.cs
index f04dd8336d0e..9b6c672dfc07 100644
--- a/src/Compatibility/Core/src/WinUI/CheckBoxRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/CheckBoxRenderer.cs
@@ -2,12 +2,13 @@
using Microsoft.Maui.Graphics;
using Microsoft.UI.Xaml;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
public class CheckBoxRenderer : ViewRenderer
{
- static WBrush _tintDefaultBrush = Colors.Blue.ToBrush();
+ static WBrush _tintDefaultBrush = Maui.ColorExtensions.ToNative(Colors.Blue);
bool _disposed = false;
protected virtual FormsCheckBox CreateNativeControl()
diff --git a/src/Compatibility/Core/src/WinUI/CollectionView/CarouselViewRenderer.cs b/src/Compatibility/Core/src/WinUI/CollectionView/CarouselViewRenderer.cs
index fe883432616d..7e275e40bf7d 100644
--- a/src/Compatibility/Core/src/WinUI/CollectionView/CarouselViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/CollectionView/CarouselViewRenderer.cs
@@ -4,6 +4,7 @@
using System.ComponentModel;
using System.Diagnostics;
using System.Threading.Tasks;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.UI.Composition;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Data;
diff --git a/src/Compatibility/Core/src/WinUI/CollectionView/ItemContentControl.cs b/src/Compatibility/Core/src/WinUI/CollectionView/ItemContentControl.cs
index 6b456229c40b..c40c5d210041 100644
--- a/src/Compatibility/Core/src/WinUI/CollectionView/ItemContentControl.cs
+++ b/src/Compatibility/Core/src/WinUI/CollectionView/ItemContentControl.cs
@@ -5,6 +5,7 @@
using WThickness = Microsoft.UI.Xaml.Thickness;
using WSize = Windows.Foundation.Size;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/CollectionView/ItemsViewRenderer.cs b/src/Compatibility/Core/src/WinUI/CollectionView/ItemsViewRenderer.cs
index 77c98e77896e..ddf1b1b16704 100644
--- a/src/Compatibility/Core/src/WinUI/CollectionView/ItemsViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/CollectionView/ItemsViewRenderer.cs
@@ -12,6 +12,7 @@
using UwpScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility;
using WRect = Windows.Foundation.Rect;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/CollectionView/StructuredItemsViewRenderer.cs b/src/Compatibility/Core/src/WinUI/CollectionView/StructuredItemsViewRenderer.cs
index 6140b80d0129..fbf3f5b9d650 100644
--- a/src/Compatibility/Core/src/WinUI/CollectionView/StructuredItemsViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/CollectionView/StructuredItemsViewRenderer.cs
@@ -1,6 +1,6 @@
using System;
using System.ComponentModel;
-
+using Microsoft.Maui.Controls.Platform;
using Microsoft.UI.Xaml.Controls;
using UWPApp = Microsoft.UI.Xaml.Application;
diff --git a/src/Compatibility/Core/src/WinUI/ColorConverter.cs b/src/Compatibility/Core/src/WinUI/ColorConverter.cs
index 11ced5914ea4..9bd25803bf62 100644
--- a/src/Compatibility/Core/src/WinUI/ColorConverter.cs
+++ b/src/Compatibility/Core/src/WinUI/ColorConverter.cs
@@ -1,4 +1,5 @@
using System;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.UI;
using Windows.UI;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
@@ -15,7 +16,7 @@ public object Convert(object value, Type targetType, object parameter, string la
WBrush defaultBrush = defaultColorKey != null ? (WBrush)Microsoft.UI.Xaml.Application.Current.Resources[defaultColorKey] : new WSolidColorBrush(Colors.Transparent);
- return color.IsDefault() ? defaultBrush : color.ToBrush();
+ return color.IsDefault() ? defaultBrush : Maui.ColorExtensions.ToNative(color);
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
diff --git a/src/Compatibility/Core/src/WinUI/ColorExtensions.cs b/src/Compatibility/Core/src/WinUI/ColorExtensions.cs
deleted file mode 100644
index ca6031e241a0..000000000000
--- a/src/Compatibility/Core/src/WinUI/ColorExtensions.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-using System;
-using Windows.UI;
-using Microsoft.UI;
-using Microsoft.Maui.Graphics;
-using WBrush = Microsoft.UI.Xaml.Media.Brush;
-using WSolidColorBrush = Microsoft.UI.Xaml.Media.SolidColorBrush;
-
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
-{
- public static class ColorExtensions
- {
- public static Windows.UI.Color GetContrastingColor(this Windows.UI.Color color)
- {
- var nThreshold = 105;
- int bgLuminance = Convert.ToInt32(color.R * 0.2 + color.G * 0.7 + color.B * 0.1);
-
- Windows.UI.Color contrastingColor = 255 - bgLuminance < nThreshold ? UI.Colors.Black : UI.Colors.White;
- return contrastingColor;
- }
-
- public static Graphics.Color ToFormsColor(this Windows.UI.Color color)
- {
- return Graphics.Color.FromRgba(color.R, color.G, color.B, color.A);
- }
-
- public static Graphics.Color ToFormsColor(this WSolidColorBrush solidColorBrush)
- {
- return solidColorBrush.Color.ToFormsColor();
- }
-
- public static WBrush ToBrush(this Graphics.Color color)
- {
- return new WSolidColorBrush(color.ToWindowsColor());
- }
-
- public static Windows.UI.Color ToWindowsColor(this Graphics.Color color)
- {
- return Windows.UI.Color.FromArgb((byte)(color.Alpha * 255), (byte)(color.Red * 255), (byte)(color.Green * 255), (byte)(color.Blue * 255));
- }
- }
-}
diff --git a/src/Compatibility/Core/src/WinUI/Compatibility.UAP.csproj b/src/Compatibility/Core/src/WinUI/Compatibility.UAP.csproj
index ea9077fb2854..dc477b358fc7 100644
--- a/src/Compatibility/Core/src/WinUI/Compatibility.UAP.csproj
+++ b/src/Compatibility/Core/src/WinUI/Compatibility.UAP.csproj
@@ -5,7 +5,7 @@
10.0.17134.0
Microsoft.Maui.Controls.Compatibility.UAP
win10-x86;win10-x64;win10-arm64
- $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;UWP_16299;UWP_18362;UWP_17134
+ $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS;UWP_16299;UWP_18362;UWP_17134
$(NoWarn);NU5104
diff --git a/src/Compatibility/Core/src/WinUI/DatePickerRenderer.cs b/src/Compatibility/Core/src/WinUI/DatePickerRenderer.cs
index 73306c4ef15d..08771edfa0ad 100644
--- a/src/Compatibility/Core/src/WinUI/DatePickerRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/DatePickerRenderer.cs
@@ -10,6 +10,7 @@
using Microsoft.Maui.Controls.Internals;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -302,7 +303,7 @@ void UpdateMinimumDate()
void UpdateTextColor()
{
Color color = Element.TextColor;
- Control.Foreground = color.IsDefault() ? (_defaultBrush ?? color.ToBrush()) : color.ToBrush();
+ Control.Foreground = color.IsDefault() ? (_defaultBrush ?? Maui.ColorExtensions.ToNative(color)) : Maui.ColorExtensions.ToNative(color);
}
}
}
\ No newline at end of file
diff --git a/src/Compatibility/Core/src/WinUI/EditorRenderer.cs b/src/Compatibility/Core/src/WinUI/EditorRenderer.cs
index d3dd0a063610..9d28ee9e421b 100644
--- a/src/Compatibility/Core/src/WinUI/EditorRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/EditorRenderer.cs
@@ -8,6 +8,7 @@
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using Specifics = Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.InputView;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/EntryRenderer.cs b/src/Compatibility/Core/src/WinUI/EntryRenderer.cs
index 7446840b2420..100338781e58 100644
--- a/src/Compatibility/Core/src/WinUI/EntryRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/EntryRenderer.cs
@@ -10,6 +10,7 @@
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using Specifics = Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.InputView;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/Extensions/ClipExtensions.cs b/src/Compatibility/Core/src/WinUI/Extensions/ClipExtensions.cs
index b2d0af0d0cc0..09a6e5bf528c 100644
--- a/src/Compatibility/Core/src/WinUI/Extensions/ClipExtensions.cs
+++ b/src/Compatibility/Core/src/WinUI/Extensions/ClipExtensions.cs
@@ -6,6 +6,7 @@
using Microsoft.UI.Xaml.Hosting;
using Microsoft.Maui.Controls.Shapes;
using WRectangleGeometry = Microsoft.UI.Xaml.Media.RectangleGeometry;
+using Microsoft.Maui.Controls.Platform;
#if UWP_18362
using WVector2 = System.Numerics.Vector2;
@@ -17,7 +18,7 @@ internal static class ClipExtensions
{
public static void Clip(this FrameworkElement frameworkElement, Geometry geometry)
{
- var wGeometry = geometry.ToWindows();
+ var wGeometry = geometry.ToNative();
if (wGeometry is WRectangleGeometry wRectangleGeometry && frameworkElement.Clip != wRectangleGeometry)
frameworkElement.Clip = wRectangleGeometry;
diff --git a/src/Compatibility/Core/src/WinUI/Extensions/ImageExtensions.cs b/src/Compatibility/Core/src/WinUI/Extensions/ImageExtensions.cs
index 4c8ac8733108..f71cc89d9a0a 100644
--- a/src/Compatibility/Core/src/WinUI/Extensions/ImageExtensions.cs
+++ b/src/Compatibility/Core/src/WinUI/Extensions/ImageExtensions.cs
@@ -11,6 +11,7 @@
using Microsoft.UI.Xaml.Media;
using Microsoft.Maui.Controls.Internals;
using WImageSource = Microsoft.UI.Xaml.Media.ImageSource;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/FileImageSourceHandler.cs b/src/Compatibility/Core/src/WinUI/FileImageSourceHandler.cs
index 8c99ea9fdadb..d0baecfd3e1a 100644
--- a/src/Compatibility/Core/src/WinUI/FileImageSourceHandler.cs
+++ b/src/Compatibility/Core/src/WinUI/FileImageSourceHandler.cs
@@ -5,6 +5,7 @@
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
using IOPath = System.IO.Path;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/FlyoutPageRenderer.cs b/src/Compatibility/Core/src/WinUI/FlyoutPageRenderer.cs
index d2a4abcdd28a..81a2e0641cf5 100644
--- a/src/Compatibility/Core/src/WinUI/FlyoutPageRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/FlyoutPageRenderer.cs
@@ -10,6 +10,7 @@
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using WImageSource = Microsoft.UI.Xaml.Media.ImageSource;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -184,7 +185,7 @@ protected virtual void OnElementChanged(ElementChangedEventArgs e)
_defaultAutomationPropertiesName = Control.SetAutomationPropertiesName(Element, _defaultAutomationPropertiesName);
_defaultAutomationPropertiesHelpText = Control.SetAutomationPropertiesHelpText(Element, _defaultAutomationPropertiesHelpText);
- _defaultAutomationPropertiesLabeledBy = Control.SetAutomationPropertiesLabeledBy(Element, _defaultAutomationPropertiesLabeledBy);
+ _defaultAutomationPropertiesLabeledBy = Control.SetAutomationPropertiesLabeledBy(Element, Element.Handler?.MauiContext ?? Forms.MauiContext, _defaultAutomationPropertiesLabeledBy);
_defaultAutomationPropertiesAccessibilityView = Control.SetAutomationPropertiesAccessibilityView(Element, _defaultAutomationPropertiesAccessibilityView);
}
}
@@ -212,7 +213,7 @@ protected virtual void OnElementPropertyChanged(object sender, PropertyChangedEv
else if (e.PropertyName == AutomationProperties.HelpTextProperty.PropertyName)
_defaultAutomationPropertiesHelpText = Control.SetAutomationPropertiesHelpText(Element, _defaultAutomationPropertiesHelpText);
else if (e.PropertyName == AutomationProperties.LabeledByProperty.PropertyName)
- _defaultAutomationPropertiesLabeledBy = Control.SetAutomationPropertiesLabeledBy(Element, _defaultAutomationPropertiesLabeledBy);
+ _defaultAutomationPropertiesLabeledBy = Control.SetAutomationPropertiesLabeledBy(Element, Element.Handler?.MauiContext ?? Forms.MauiContext, _defaultAutomationPropertiesLabeledBy);
else if (e.PropertyName == AutomationProperties.IsInAccessibleTreeProperty.PropertyName)
_defaultAutomationPropertiesAccessibilityView = Control.SetAutomationPropertiesAccessibilityView(Element, _defaultAutomationPropertiesAccessibilityView);
}
diff --git a/src/Compatibility/Core/src/WinUI/FontImageSourceHandler.cs b/src/Compatibility/Core/src/WinUI/FontImageSourceHandler.cs
index c32cb67fdf19..3c22f09eb81f 100644
--- a/src/Compatibility/Core/src/WinUI/FontImageSourceHandler.cs
+++ b/src/Compatibility/Core/src/WinUI/FontImageSourceHandler.cs
@@ -4,6 +4,7 @@
using Microsoft.Graphics.Canvas;
using Microsoft.Graphics.Canvas.Text;
using Microsoft.Graphics.Canvas.UI.Xaml;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Graphics;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
@@ -68,7 +69,7 @@ public sealed class FontImageSourceHandler : IImageSourceHandler, IIconElementHa
{
Glyph = fontImageSource.Glyph,
FontSize = fontImageSource.Size,
- Foreground = fontImageSource.Color.ToBrush()
+ Foreground = Maui.ColorExtensions.ToNative(fontImageSource.Color)
};
var uwpFontFamily = fontImageSource.FontFamily.ToFontFamily();
@@ -90,7 +91,7 @@ public sealed class FontImageSourceHandler : IImageSourceHandler, IIconElementHa
{
Glyph = fontImageSource.Glyph,
FontSize = fontImageSource.Size,
- Foreground = fontImageSource.Color.ToBrush()
+ Foreground = Maui.ColorExtensions.ToNative(fontImageSource.Color)
};
var uwpFontFamily = fontImageSource.FontFamily.ToFontFamily();
diff --git a/src/Compatibility/Core/src/WinUI/Forms.cs b/src/Compatibility/Core/src/WinUI/Forms.cs
index bddacd4e10ac..35cbf8e03dd3 100644
--- a/src/Compatibility/Core/src/WinUI/Forms.cs
+++ b/src/Compatibility/Core/src/WinUI/Forms.cs
@@ -66,15 +66,12 @@ static void SetupInit(
Registrar.RegisterRendererToHandlerShim(RendererToHandlerShim.CreateShim);
var accent = (WSolidColorBrush)Microsoft.UI.Xaml.Application.Current.Resources["SystemColorControlAccentBrush"];
- KnownColor.SetAccent(accent.ToFormsColor());
+ KnownColor.SetAccent(accent.ToColor());
if (!IsInitialized)
{
-#if !UWP_16299
Log.Listeners.Add(new DelegateLogListener((c, m) => Debug.WriteLine(LogFormat, c, m)));
-#else
- Log.Listeners.Add(new DelegateLogListener((c, m) => Trace.WriteLine(m, c)));
-#endif
+
}
if (!UI.Xaml.Application.Current.Resources.ContainsKey("RootContainerStyle"))
diff --git a/src/Compatibility/Core/src/WinUI/FormsButton.cs b/src/Compatibility/Core/src/WinUI/FormsButton.cs
index baf56bbe0a52..32351437ad04 100644
--- a/src/Compatibility/Core/src/WinUI/FormsButton.cs
+++ b/src/Compatibility/Core/src/WinUI/FormsButton.cs
@@ -1,3 +1,4 @@
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Graphics;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
diff --git a/src/Compatibility/Core/src/WinUI/FormsRadioButton.cs b/src/Compatibility/Core/src/WinUI/FormsRadioButton.cs
index 2abaa58d92eb..1b0888cdf1e7 100644
--- a/src/Compatibility/Core/src/WinUI/FormsRadioButton.cs
+++ b/src/Compatibility/Core/src/WinUI/FormsRadioButton.cs
@@ -1,3 +1,4 @@
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Graphics;
using Microsoft.UI.Xaml;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
diff --git a/src/Compatibility/Core/src/WinUI/FrameRenderer.cs b/src/Compatibility/Core/src/WinUI/FrameRenderer.cs
index 36d23a3094ea..46c3fe094118 100644
--- a/src/Compatibility/Core/src/WinUI/FrameRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/FrameRenderer.cs
@@ -3,6 +3,7 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml.Controls;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -67,7 +68,7 @@ protected override void UpdateBackgroundColor()
if (Control != null)
{
Control.Background = backgroundColor.IsDefault() ?
- new Microsoft.UI.Xaml.Media.SolidColorBrush((Windows.UI.Color)Resources["SystemAltHighColor"]) : backgroundColor.ToBrush();
+ new Microsoft.UI.Xaml.Media.SolidColorBrush((Windows.UI.Color)Resources["SystemAltHighColor"]) : Maui.ColorExtensions.ToNative(backgroundColor);
}
}
@@ -80,7 +81,7 @@ protected override void UpdateBackground()
{
if (Brush.IsNullOrEmpty(background))
Control.Background = backgroundColor.IsDefault() ?
- new Microsoft.UI.Xaml.Media.SolidColorBrush((Windows.UI.Color)Resources["SystemAltHighColor"]) : backgroundColor.ToBrush();
+ new Microsoft.UI.Xaml.Media.SolidColorBrush((Windows.UI.Color)Resources["SystemAltHighColor"]) : Maui.ColorExtensions.ToNative(backgroundColor);
else
Control.Background = background.ToBrush();
}
@@ -99,12 +100,12 @@ void UpdateBorder()
{
if (Element.BorderColor.IsNotDefault())
{
- Control.BorderBrush = Element.BorderColor.ToBrush();
+ Control.BorderBrush = Maui.ColorExtensions.ToNative(Element.BorderColor);
Control.BorderThickness = WinUIHelpers.CreateThickness(1);
}
else
{
- Control.BorderBrush = new Color(0, 0, 0, 0).ToBrush();
+ Control.BorderBrush = Maui.ColorExtensions.ToNative(new Color(0, 0, 0, 0));
}
}
diff --git a/src/Compatibility/Core/src/WinUI/HandlerToRendererShim.cs b/src/Compatibility/Core/src/WinUI/HandlerToRendererShim.cs
index 2c1a59c59666..6d5796715544 100644
--- a/src/Compatibility/Core/src/WinUI/HandlerToRendererShim.cs
+++ b/src/Compatibility/Core/src/WinUI/HandlerToRendererShim.cs
@@ -4,6 +4,7 @@
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
using Microsoft.UI.Xaml;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility
{
diff --git a/src/Compatibility/Core/src/WinUI/IDontGetFocus.cs b/src/Compatibility/Core/src/WinUI/IDontGetFocus.cs
deleted file mode 100644
index 58311370770a..000000000000
--- a/src/Compatibility/Core/src/WinUI/IDontGetFocus.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
-{
- public interface IDontGetFocus
- {
- }
-}
diff --git a/src/Compatibility/Core/src/WinUI/ITabStopOnDescendants.cs b/src/Compatibility/Core/src/WinUI/ITabStopOnDescendants.cs
deleted file mode 100644
index 0f6dcbef0a93..000000000000
--- a/src/Compatibility/Core/src/WinUI/ITabStopOnDescendants.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
-{
- public interface ITabStopOnDescendants: IDontGetFocus
- {
- }
-}
diff --git a/src/Compatibility/Core/src/WinUI/IVisualElementRenderer.cs b/src/Compatibility/Core/src/WinUI/IVisualElementRenderer.cs
index 7ca4eec57cc3..45d7a501bac2 100644
--- a/src/Compatibility/Core/src/WinUI/IVisualElementRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/IVisualElementRenderer.cs
@@ -1,4 +1,5 @@
using System;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.UI.Xaml;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
diff --git a/src/Compatibility/Core/src/WinUI/ImageButtonRenderer.cs b/src/Compatibility/Core/src/WinUI/ImageButtonRenderer.cs
index 9998c7fa6e87..fe413103b3d8 100644
--- a/src/Compatibility/Core/src/WinUI/ImageButtonRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ImageButtonRenderer.cs
@@ -10,6 +10,7 @@
using WStretch = Microsoft.UI.Xaml.Media.Stretch;
using WThickness = Microsoft.UI.Xaml.Thickness;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -251,14 +252,14 @@ void OnPointerPressed(object sender, RoutedEventArgs e)
void UpdateImageButtonBackground()
{
if (Brush.IsNullOrEmpty(Element.Background))
- Control.BackgroundColor = Element.BackgroundColor.IsNotDefault() ? Element.BackgroundColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBackgroundThemeBrush"];
+ Control.BackgroundColor = Element.BackgroundColor.IsNotDefault() ? Maui.ColorExtensions.ToNative(Element.BackgroundColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBackgroundThemeBrush"];
else
Control.BackgroundColor = Element.Background.ToBrush();
}
void UpdateBorderColor()
{
- Control.BorderBrush = Element.BorderColor.IsNotDefault() ? Element.BorderColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBorderThemeBrush"];
+ Control.BorderBrush = Element.BorderColor.IsNotDefault() ? Maui.ColorExtensions.ToNative(Element.BorderColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBorderThemeBrush"];
}
void UpdateBorderRadius()
diff --git a/src/Compatibility/Core/src/WinUI/ImageElementManager.cs b/src/Compatibility/Core/src/WinUI/ImageElementManager.cs
index f34e1d1fcb0c..65da9d3f0ea2 100644
--- a/src/Compatibility/Core/src/WinUI/ImageElementManager.cs
+++ b/src/Compatibility/Core/src/WinUI/ImageElementManager.cs
@@ -6,6 +6,7 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
using WStretch = Microsoft.UI.Xaml.Media.Stretch;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/ImageRenderer.cs b/src/Compatibility/Core/src/WinUI/ImageRenderer.cs
index 4b7b6184198f..e5ab8770d918 100644
--- a/src/Compatibility/Core/src/WinUI/ImageRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ImageRenderer.cs
@@ -3,6 +3,7 @@
using System.Threading.Tasks;
using Microsoft.UI.Xaml;
using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/IndicatorViewRenderer.cs b/src/Compatibility/Core/src/WinUI/IndicatorViewRenderer.cs
index d066210c1bad..8b55ff481017 100644
--- a/src/Compatibility/Core/src/WinUI/IndicatorViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/IndicatorViewRenderer.cs
@@ -8,6 +8,7 @@
using WEllipse = Microsoft.UI.Xaml.Shapes.Ellipse;
using WRectangle = Microsoft.UI.Xaml.Shapes.Rectangle;
using WShape = Microsoft.UI.Xaml.Shapes.Shape;
+using Microsoft.Maui.Controls.Platform;
using WSolidColorBrush = Microsoft.UI.Xaml.Media.SolidColorBrush;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
diff --git a/src/Compatibility/Core/src/WinUI/LabelRenderer.cs b/src/Compatibility/Core/src/WinUI/LabelRenderer.cs
index 8d09894bead3..26dbea5d3cb6 100644
--- a/src/Compatibility/Core/src/WinUI/LabelRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/LabelRenderer.cs
@@ -15,6 +15,7 @@
using WRect = Windows.Foundation.Rect;
using WThickness = Microsoft.UI.Xaml.Thickness;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -25,7 +26,7 @@ public static Run ToRun(this Span span)
var run = new Run { Text = span.Text ?? string.Empty };
if (span.TextColor.IsNotDefault())
- run.Foreground = span.TextColor.ToBrush();
+ run.Foreground = Maui.ColorExtensions.ToNative(span.TextColor);
if (!span.IsDefault())
run.ApplyFont(span);
@@ -247,7 +248,7 @@ void UpdateColor(TextBlock textBlock)
Label label = Element;
if (label != null && label.TextColor.IsNotDefault())
{
- textBlock.Foreground = label.TextColor.ToBrush();
+ textBlock.Foreground = Maui.ColorExtensions.ToNative(label.TextColor);
}
else
{
diff --git a/src/Compatibility/Core/src/WinUI/LayoutRenderer.cs b/src/Compatibility/Core/src/WinUI/LayoutRenderer.cs
index 6e3e1b0584a6..ade47c3f9a25 100644
--- a/src/Compatibility/Core/src/WinUI/LayoutRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/LayoutRenderer.cs
@@ -6,6 +6,7 @@
using WRect = Windows.Foundation.Rect;
using WSolidColorBrush = Microsoft.UI.Xaml.Media.SolidColorBrush;
using Microsoft.UI;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/ListViewRenderer.cs b/src/Compatibility/Core/src/WinUI/ListViewRenderer.cs
index 4ad43768a022..fab01fb474ca 100644
--- a/src/Compatibility/Core/src/WinUI/ListViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ListViewRenderer.cs
@@ -21,6 +21,7 @@
using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
using Specifics = Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.ListView;
using System.Collections.ObjectModel;
+using Microsoft.Maui.Controls.Platform;
using UwpScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility;
using WSelectionChangedEventArgs = Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs;
diff --git a/src/Compatibility/Core/src/WinUI/MasterBackgroundConverter.cs b/src/Compatibility/Core/src/WinUI/MasterBackgroundConverter.cs
index 63b427b2e529..4be2b83c36bf 100644
--- a/src/Compatibility/Core/src/WinUI/MasterBackgroundConverter.cs
+++ b/src/Compatibility/Core/src/WinUI/MasterBackgroundConverter.cs
@@ -38,7 +38,7 @@ public object Convert(object value, Type targetType, object parameter, string la
brush = value as WSolidColorBrush;
if (brush != null)
{
- Maui.Graphics.Color color = brush.ToFormsColor();
+ Maui.Graphics.Color color = brush.ToColor();
double delta = Shift;
if (color.GetLuminosity() > .6)
diff --git a/src/Compatibility/Core/src/WinUI/NativeViewWrapperRenderer.cs b/src/Compatibility/Core/src/WinUI/NativeViewWrapperRenderer.cs
index cb9e2f2dc636..b13e90946da3 100644
--- a/src/Compatibility/Core/src/WinUI/NativeViewWrapperRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/NativeViewWrapperRenderer.cs
@@ -1,5 +1,6 @@
using Microsoft.UI.Xaml;
using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/NavigationPageRenderer.cs b/src/Compatibility/Core/src/WinUI/NavigationPageRenderer.cs
index a014c698006c..07d072672d10 100644
--- a/src/Compatibility/Core/src/WinUI/NavigationPageRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/NavigationPageRenderer.cs
@@ -16,6 +16,7 @@
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using WImageSource = Microsoft.UI.Xaml.Media.ImageSource;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -281,7 +282,7 @@ WBrush GetBarBackgroundColorBrush()
if (Element.BarBackgroundColor.IsDefault() && defaultColor != null)
return (WBrush)defaultColor;
- return Element.BarBackgroundColor.ToBrush();
+ return Maui.ColorExtensions.ToNative(Element.BarBackgroundColor);
}
WBrush GetBarBackgroundBrush()
@@ -303,7 +304,7 @@ WBrush GetBarForegroundBrush()
object defaultColor = Microsoft.UI.Xaml.Application.Current.Resources["ApplicationForegroundThemeBrush"];
if (Element.BarTextColor.IsDefault())
return (WBrush)defaultColor;
- return Element.BarTextColor.ToBrush();
+ return Maui.ColorExtensions.ToNative(Element.BarTextColor);
}
bool GetIsNavBarPossible()
diff --git a/src/Compatibility/Core/src/WinUI/PageRenderer.cs b/src/Compatibility/Core/src/WinUI/PageRenderer.cs
index 21d142f696c8..7cd725c8c2bd 100644
--- a/src/Compatibility/Core/src/WinUI/PageRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/PageRenderer.cs
@@ -4,6 +4,7 @@
using Microsoft.UI.Xaml.Automation.Peers;
using Microsoft.UI.Xaml.Controls;
using System;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/PickerRenderer.cs b/src/Compatibility/Core/src/WinUI/PickerRenderer.cs
index 3100a5005b87..ad0185a7c82d 100644
--- a/src/Compatibility/Core/src/WinUI/PickerRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/PickerRenderer.cs
@@ -8,6 +8,7 @@
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using WSelectionChangedEventArgs = Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -218,7 +219,7 @@ void UpdateSelectedIndex()
void UpdateTextColor()
{
Color color = Element.TextColor;
- Control.Foreground = color.IsDefault() ? (_defaultBrush ?? color.ToBrush()) : color.ToBrush();
+ Control.Foreground = color.IsDefault() ? (_defaultBrush ?? Maui.ColorExtensions.ToNative(color)) : Maui.ColorExtensions.ToNative(color);
}
void UpdateTitle()
diff --git a/src/Compatibility/Core/src/WinUI/Platform.cs b/src/Compatibility/Core/src/WinUI/Platform.cs
index 1039d5c37181..04a2022fd2c5 100644
--- a/src/Compatibility/Core/src/WinUI/Platform.cs
+++ b/src/Compatibility/Core/src/WinUI/Platform.cs
@@ -11,6 +11,7 @@
using WFlowDirection = Microsoft.UI.Xaml.FlowDirection;
using WImage = Microsoft.UI.Xaml.Controls.Image;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -146,11 +147,11 @@ internal Platform(Microsoft.UI.Xaml.Window page)
UpdateBounds();
InitializeStatusBar();
-
- // TODO WINUI
- //SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;
+
+ if(!NativeVersion.IsDesktop)
+ SystemNavigationManager.GetForCurrentView().BackRequested += OnBackRequested;
- // TODO WINUI
+ // TODO WINUI: This event is only available on UWP
// Microsoft.UI.Xaml.Application.Current.Resuming += OnResumingAsync;
}
@@ -555,14 +556,16 @@ internal async Task UpdateToolbarItems()
button.Content = img;
}
- // WINUUI FIX
+ // TODO WINUI FIX
//button.Command = new MenuItemCommand(item);
button.DataContext = item;
button.SetValue(NativeAutomationProperties.AutomationIdProperty, item.AutomationId);
button.SetAutomationPropertiesName(item);
button.SetAutomationPropertiesAccessibilityView(item);
button.SetAutomationPropertiesHelpText(item);
- button.SetAutomationPropertiesLabeledBy(item);
+
+ // TODO MAUI
+ button.SetAutomationPropertiesLabeledBy(item, null);
ToolbarItemOrder order = item.Order == ToolbarItemOrder.Default ? ToolbarItemOrder.Primary : item.Order;
if (order == ToolbarItemOrder.Primary)
diff --git a/src/Compatibility/Core/src/WinUI/PointCollectionExtensions.cs b/src/Compatibility/Core/src/WinUI/PointCollectionExtensions.cs
index c9047a6df2b2..030a654a6e10 100644
--- a/src/Compatibility/Core/src/WinUI/PointCollectionExtensions.cs
+++ b/src/Compatibility/Core/src/WinUI/PointCollectionExtensions.cs
@@ -1,7 +1,7 @@
using Microsoft.Maui.Controls.Shapes;
using Microsoft.Maui.Graphics;
-#if WINDOWS_UWP
+#if WINDOWS
using WPoint = Windows.Foundation.Point;
using WPointCollection = Microsoft.UI.Xaml.Media.PointCollection;
diff --git a/src/Compatibility/Core/src/WinUI/PointExtensions.cs b/src/Compatibility/Core/src/WinUI/PointExtensions.cs
deleted file mode 100644
index 8e35f0134131..000000000000
--- a/src/Compatibility/Core/src/WinUI/PointExtensions.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-#if WINDOWS_UWP
-using Microsoft.Maui.Graphics;
-using WPoint = Windows.Foundation.Point;
-
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
-#else
-using WPoint = System.Windows.Point;
-
-namespace Microsoft.Maui.Controls.Compatibility.Platform.WPF
-#endif
-{
- public static class PointExtensions
- {
- public static WPoint ToWindows(this Point point)
- {
- return new WPoint(point.X, point.Y);
- }
- }
-}
\ No newline at end of file
diff --git a/src/Compatibility/Core/src/WinUI/ProgressBarRenderer.cs b/src/Compatibility/Core/src/WinUI/ProgressBarRenderer.cs
index e94c0a97c74b..19f0dfb5c345 100644
--- a/src/Compatibility/Core/src/WinUI/ProgressBarRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ProgressBarRenderer.cs
@@ -3,6 +3,7 @@
using Microsoft.UI.Xaml.Controls.Primitives;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -82,7 +83,7 @@ void UpdateProgressColor()
}
else
{
- Control.Foreground = color.ToBrush();
+ Control.Foreground = Maui.ColorExtensions.ToNative(color);
}
}
diff --git a/src/Compatibility/Core/src/WinUI/Properties/AssemblyInfo.cs b/src/Compatibility/Core/src/WinUI/Properties/AssemblyInfo.cs
index 0420d1c75567..fbf59ecd6945 100644
--- a/src/Compatibility/Core/src/WinUI/Properties/AssemblyInfo.cs
+++ b/src/Compatibility/Core/src/WinUI/Properties/AssemblyInfo.cs
@@ -1,6 +1,7 @@
using System.Reflection;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Controls.Shapes;
using Rectangle = Microsoft.Maui.Controls.Shapes.Rectangle;
diff --git a/src/Compatibility/Core/src/WinUI/RadioButtonRenderer.cs b/src/Compatibility/Core/src/WinUI/RadioButtonRenderer.cs
index 6d3e2e7a3fef..b9058df086c9 100644
--- a/src/Compatibility/Core/src/WinUI/RadioButtonRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/RadioButtonRenderer.cs
@@ -5,6 +5,7 @@
using WThickness = Microsoft.UI.Xaml.Thickness;
using static Microsoft.Maui.Controls.Compatibility.Platform.UWP.ViewToRendererConverter;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -145,14 +146,14 @@ void OnRadioButtonCheckedOrUnchecked(object sender, RoutedEventArgs e)
void UpdateBackgroundBrush()
{
if (Brush.IsNullOrEmpty(Element.Background))
- Control.BackgroundColor = Element.BackgroundColor.IsNotDefault() ? Element.BackgroundColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBackgroundThemeBrush"];
+ Control.BackgroundColor = Element.BackgroundColor.IsNotDefault() ? Maui.ColorExtensions.ToNative(Element.BackgroundColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBackgroundThemeBrush"];
else
Control.BackgroundColor = Element.Background.ToBrush();
}
void UpdateBorderColor()
{
- Control.BorderBrush = Element.BorderColor.IsNotDefault() ? Element.BorderColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBorderThemeBrush"];
+ Control.BorderBrush = Element.BorderColor.IsNotDefault() ? Maui.ColorExtensions.ToNative(Element.BorderColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["ButtonBorderThemeBrush"];
}
void UpdateBorderRadius()
@@ -196,7 +197,7 @@ void UpdateFont()
void UpdateTextColor()
{
- Control.Foreground = Element.TextColor.IsNotDefault() ? Element.TextColor.ToBrush() : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["DefaultTextForegroundThemeBrush"];
+ Control.Foreground = Element.TextColor.IsNotDefault() ? Maui.ColorExtensions.ToNative(Element.TextColor) : (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["DefaultTextForegroundThemeBrush"];
}
void UpdatePadding()
diff --git a/src/Compatibility/Core/src/WinUI/RefreshViewRenderer.cs b/src/Compatibility/Core/src/WinUI/RefreshViewRenderer.cs
index f759d854f95a..d73e341a3655 100644
--- a/src/Compatibility/Core/src/WinUI/RefreshViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/RefreshViewRenderer.cs
@@ -9,6 +9,7 @@
using Specifics = Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.RefreshView;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -120,9 +121,9 @@ protected override void UpdateBackgroundColor()
return;
if (Element.BackgroundColor.IsNotDefault())
- Control.Visualizer.Background = Element.BackgroundColor.ToBrush();
+ Control.Visualizer.Background = Maui.ColorExtensions.ToNative(Element.BackgroundColor);
else
- Control.Visualizer.Background = Colors.White.ToBrush();
+ Control.Visualizer.Background = Maui.ColorExtensions.ToNative(Colors.White);
}
void UpdateContent()
@@ -160,7 +161,7 @@ void UpdateColors()
return;
Control.Visualizer.Foreground = Element.RefreshColor.IsNotDefault()
- ? Element.RefreshColor.ToBrush()
+ ? Maui.ColorExtensions.ToNative(Element.RefreshColor)
: (WBrush)Microsoft.UI.Xaml.Application.Current.Resources["DefaultTextForegroundThemeBrush"];
UpdateBackgroundColor();
diff --git a/src/Compatibility/Core/src/WinUI/RendererToHandlerShim.cs b/src/Compatibility/Core/src/WinUI/RendererToHandlerShim.cs
index 9e24462c3ca1..58bcf88985d2 100644
--- a/src/Compatibility/Core/src/WinUI/RendererToHandlerShim.cs
+++ b/src/Compatibility/Core/src/WinUI/RendererToHandlerShim.cs
@@ -4,6 +4,7 @@
using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
using Microsoft.UI.Xaml;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility
{
diff --git a/src/Compatibility/Core/src/WinUI/ScrollViewRenderer.cs b/src/Compatibility/Core/src/WinUI/ScrollViewRenderer.cs
index 6dae05612797..8489dce9823b 100644
--- a/src/Compatibility/Core/src/WinUI/ScrollViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ScrollViewRenderer.cs
@@ -6,6 +6,7 @@
using WRect = Windows.Foundation.Rect;
using UwpScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/SearchBarRenderer.cs b/src/Compatibility/Core/src/WinUI/SearchBarRenderer.cs
index 122513558bcc..c95a7bbde8d0 100644
--- a/src/Compatibility/Core/src/WinUI/SearchBarRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/SearchBarRenderer.cs
@@ -7,6 +7,7 @@
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using Specifics = Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.SearchBar;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -188,7 +189,7 @@ void UpdateCancelButtonColor()
else
{
// Determine whether the background should be black or white (in order to make the foreground color visible)
- var bcolor = cancelColor.ToWindowsColor().GetContrastingColor().ToFormsColor();
+ var bcolor = cancelColor.ToWindowsColor().GetContrastingColor().ToColor();
BrushHelpers.UpdateColor(bcolor, ref _defaultDeleteButtonBackgroundColorBrush,
() => _cancelButton.BackgroundBrush, brush => _cancelButton.BackgroundBrush = brush);
}
@@ -325,7 +326,7 @@ protected override void UpdateBackgroundColor()
if (!backgroundColor.IsDefault())
{
- _queryTextBox.Background = backgroundColor.ToBrush();
+ _queryTextBox.Background = Maui.ColorExtensions.ToNative(backgroundColor);
}
else
{
diff --git a/src/Compatibility/Core/src/WinUI/Shapes/EllipseRenderer.cs b/src/Compatibility/Core/src/WinUI/Shapes/EllipseRenderer.cs
index ca88dff12a98..eebef955337a 100644
--- a/src/Compatibility/Core/src/WinUI/Shapes/EllipseRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shapes/EllipseRenderer.cs
@@ -1,6 +1,7 @@
using Microsoft.Maui.Controls.Shapes;
+using Microsoft.Maui.Controls.Platform;
-#if WINDOWS_UWP
+#if WINDOWS
using WEllipse = Microsoft.UI.Xaml.Shapes.Ellipse;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
diff --git a/src/Compatibility/Core/src/WinUI/Shapes/LineRenderer.cs b/src/Compatibility/Core/src/WinUI/Shapes/LineRenderer.cs
index 9dfe376e930c..1aeb68b77b92 100644
--- a/src/Compatibility/Core/src/WinUI/Shapes/LineRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shapes/LineRenderer.cs
@@ -1,7 +1,8 @@
using System.ComponentModel;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Controls.Shapes;
-#if WINDOWS_UWP
+#if WINDOWS
using WLine = Microsoft.UI.Xaml.Shapes.Line;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
diff --git a/src/Compatibility/Core/src/WinUI/Shapes/PathRenderer.cs b/src/Compatibility/Core/src/WinUI/Shapes/PathRenderer.cs
index bebc33b16948..ea981f0e6c15 100644
--- a/src/Compatibility/Core/src/WinUI/Shapes/PathRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shapes/PathRenderer.cs
@@ -1,7 +1,8 @@
using System.ComponentModel;
using Path = Microsoft.Maui.Controls.Shapes.Path;
+using Microsoft.Maui.Controls.Platform;
-#if WINDOWS_UWP
+#if WINDOWS
using WPath = Microsoft.UI.Xaml.Shapes.Path;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
@@ -41,7 +42,7 @@ protected override void OnElementPropertyChanged(object sender, PropertyChangedE
void UpdateData()
{
- Control.Data = Element.Data.ToWindows();
+ Control.Data = Element.Data.ToNative();
}
void UpdateRenderTransform()
diff --git a/src/Compatibility/Core/src/WinUI/Shapes/PolygonRenderer.cs b/src/Compatibility/Core/src/WinUI/Shapes/PolygonRenderer.cs
index 5a2c0d47aa3c..2e296468311e 100644
--- a/src/Compatibility/Core/src/WinUI/Shapes/PolygonRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shapes/PolygonRenderer.cs
@@ -1,8 +1,9 @@
using System.ComponentModel;
using Microsoft.Maui.Controls.Shapes;
using System.Collections.Specialized;
+using Microsoft.Maui.Controls.Platform;
-#if WINDOWS_UWP
+#if WINDOWS
using WFillRule = Microsoft.UI.Xaml.Media.FillRule;
using WPolygon = Microsoft.UI.Xaml.Shapes.Polygon;
diff --git a/src/Compatibility/Core/src/WinUI/Shapes/PolylineRenderer.cs b/src/Compatibility/Core/src/WinUI/Shapes/PolylineRenderer.cs
index 862909fb7ca1..8ef1f35f0bc9 100644
--- a/src/Compatibility/Core/src/WinUI/Shapes/PolylineRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shapes/PolylineRenderer.cs
@@ -1,8 +1,9 @@
using System.ComponentModel;
using Microsoft.Maui.Controls.Shapes;
using System.Collections.Specialized;
+using Microsoft.Maui.Controls.Platform;
-#if WINDOWS_UWP
+#if WINDOWS
using WFillRule = Microsoft.UI.Xaml.Media.FillRule;
using WPolyline = Microsoft.UI.Xaml.Shapes.Polyline;
diff --git a/src/Compatibility/Core/src/WinUI/Shapes/RectangleRenderer.cs b/src/Compatibility/Core/src/WinUI/Shapes/RectangleRenderer.cs
index 328db4023f7c..e838de0dfa91 100644
--- a/src/Compatibility/Core/src/WinUI/Shapes/RectangleRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shapes/RectangleRenderer.cs
@@ -1,7 +1,8 @@
using System.ComponentModel;
+using Microsoft.Maui.Controls.Platform;
using FormsRectangle = Microsoft.Maui.Controls.Shapes.Rectangle;
-#if WINDOWS_UWP
+#if WINDOWS
using WRectangle = Microsoft.UI.Xaml.Shapes.Rectangle;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
diff --git a/src/Compatibility/Core/src/WinUI/Shapes/ShapeRenderer.cs b/src/Compatibility/Core/src/WinUI/Shapes/ShapeRenderer.cs
index e120fc2b8f3a..9be91b9227ff 100644
--- a/src/Compatibility/Core/src/WinUI/Shapes/ShapeRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shapes/ShapeRenderer.cs
@@ -2,8 +2,9 @@
using System.ComponentModel;
using Shape = Microsoft.Maui.Controls.Shapes.Shape;
using Microsoft.Maui.Controls.Shapes;
+using Microsoft.Maui.Controls.Platform;
-#if WINDOWS_UWP
+#if WINDOWS
using Microsoft.UI.Xaml;
using WDoubleCollection = Microsoft.UI.Xaml.Media.DoubleCollection;
using WPenLineCap = Microsoft.UI.Xaml.Media.PenLineCap;
@@ -74,7 +75,7 @@ protected override void OnElementPropertyChanged(object sender, PropertyChangedE
UpdateStrokeMiterLimit();
}
-#if !WINDOWS_UWP
+#if !WINDOWS
new
#endif
void UpdateHeight()
@@ -82,7 +83,7 @@ void UpdateHeight()
Control.Height = Math.Max(Element.Height, 0);
}
-#if !WINDOWS_UWP
+#if !WINDOWS
new
#endif
void UpdateWidth()
diff --git a/src/Compatibility/Core/src/WinUI/Shell/ShellItemRenderer.cs b/src/Compatibility/Core/src/WinUI/Shell/ShellItemRenderer.cs
index ab541b8e99a6..1303de7cb14e 100644
--- a/src/Compatibility/Core/src/WinUI/Shell/ShellItemRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shell/ShellItemRenderer.cs
@@ -17,6 +17,7 @@
using Microsoft.UI.Xaml.Media;
using UwpApplication = Microsoft.UI.Xaml.Application;
using UwpSolidColorBrush = Microsoft.UI.Xaml.Media.SolidColorBrush;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -167,7 +168,7 @@ void UpdateBottomBar()
if (!fontImageSource.Color.IsDefault())
{
- icon.Foreground = fontImageSource.Color.ToBrush();
+ icon.Foreground = Maui.ColorExtensions.ToNative(fontImageSource.Color);
}
btn.Icon = icon;
diff --git a/src/Compatibility/Core/src/WinUI/Shell/ShellRenderer.cs b/src/Compatibility/Core/src/WinUI/Shell/ShellRenderer.cs
index ef0340b92859..a0e1833a7d05 100644
--- a/src/Compatibility/Core/src/WinUI/Shell/ShellRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shell/ShellRenderer.cs
@@ -11,6 +11,7 @@
using Microsoft.UI;
using System.Collections.Specialized;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -302,7 +303,7 @@ protected virtual void UpdateFlyoutBackgroundColor()
new WSolidColorBrush(uiColor);
}
else
- FlyoutBackgroundColor = _shell.FlyoutBackgroundColor.ToBrush();
+ FlyoutBackgroundColor = Maui.ColorExtensions.ToNative(_shell.FlyoutBackgroundColor);
}
protected virtual void OnElementSet(Shell shell)
diff --git a/src/Compatibility/Core/src/WinUI/Shell/ShellSplitView.cs b/src/Compatibility/Core/src/WinUI/Shell/ShellSplitView.cs
index 84fe596dd8d5..860a754bfec1 100644
--- a/src/Compatibility/Core/src/WinUI/Shell/ShellSplitView.cs
+++ b/src/Compatibility/Core/src/WinUI/Shell/ShellSplitView.cs
@@ -2,6 +2,7 @@
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using WRectangle = Microsoft.UI.Xaml.Shapes.Rectangle;
using Microsoft.UI.Xaml;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/Shell/ShellToolbarItemRenderer.cs b/src/Compatibility/Core/src/WinUI/Shell/ShellToolbarItemRenderer.cs
index 6faaa5f8213c..4258653d686e 100644
--- a/src/Compatibility/Core/src/WinUI/Shell/ShellToolbarItemRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/Shell/ShellToolbarItemRenderer.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Input;
@@ -44,14 +45,16 @@ void ToolbarItemChanged(ToolbarItem oldItem, ToolbarItem newItem)
if(oldItem != null)
oldItem.PropertyChanged -= ToolbarItemPropertyChanged;
- this.SetAutomationProperties(newItem, defaultName: newItem?.Text);
+ // TODO MAUI
+ this.SetAutomationProperties(newItem, null, defaultName: newItem?.Text);
if (newItem != null)
newItem.PropertyChanged += ToolbarItemPropertyChanged;
void ToolbarItemPropertyChanged(object sender, PropertyChangedEventArgs e)
{
- this.SetAutomationProperties(newItem, defaultName: newItem?.Text);
+ // TODO MAUI
+ this.SetAutomationProperties(newItem, null, defaultName: newItem?.Text);
}
}
}
diff --git a/src/Compatibility/Core/src/WinUI/SliderRenderer.cs b/src/Compatibility/Core/src/WinUI/SliderRenderer.cs
index 6799ddc1e406..8d4394232745 100644
--- a/src/Compatibility/Core/src/WinUI/SliderRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/SliderRenderer.cs
@@ -7,6 +7,7 @@
using Microsoft.UI.Xaml.Media;
using Microsoft.UI.Xaml.Media.Imaging;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -110,7 +111,7 @@ void UpdateMinimumTrackColor()
if (Element.MinimumTrackColor.IsDefault())
Control.Foreground = defaultforegroundcolor;
else
- Control.Foreground = Element.MinimumTrackColor.ToBrush();
+ Control.Foreground = Maui.ColorExtensions.ToNative(Element.MinimumTrackColor);
}
}
@@ -122,7 +123,7 @@ void UpdateMaximumTrackColor()
if (Element.MaximumTrackColor.IsDefault())
Control.Background = defaultbackgroundcolor;
else
- Control.Background = Element.MaximumTrackColor.ToBrush();
+ Control.Background = Maui.ColorExtensions.ToNative(Element.MaximumTrackColor);
}
}
@@ -194,7 +195,7 @@ protected override void UpdateBackgroundColor()
Color backgroundColor = Element.BackgroundColor;
if (!backgroundColor.IsDefault())
{
- Control.Background = backgroundColor.ToBrush();
+ Control.Background = Maui.ColorExtensions.ToNative(backgroundColor);
}
else
{
diff --git a/src/Compatibility/Core/src/WinUI/StepperControl.cs b/src/Compatibility/Core/src/WinUI/StepperControl.cs
index 5f3bff00a9fc..a1e78f6c9ee2 100644
--- a/src/Compatibility/Core/src/WinUI/StepperControl.cs
+++ b/src/Compatibility/Core/src/WinUI/StepperControl.cs
@@ -9,6 +9,7 @@
using WVisualStateGroup = Microsoft.UI.Xaml.VisualStateGroup;
using WVisualState = Microsoft.UI.Xaml.VisualState;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -230,7 +231,7 @@ void UpdateButtonBackgroundColor(Color value)
return;
}
- WBrush brush = value.ToBrush();
+ WBrush brush = Maui.ColorExtensions.ToNative(value);
_minus = GetTemplateChild("Minus") as Microsoft.UI.Xaml.Controls.Button;
_plus = GetTemplateChild("Plus") as Microsoft.UI.Xaml.Controls.Button;
if (_minus != null)
diff --git a/src/Compatibility/Core/src/WinUI/StepperRenderer.cs b/src/Compatibility/Core/src/WinUI/StepperRenderer.cs
index cc4536ad4811..83be6543164c 100644
--- a/src/Compatibility/Core/src/WinUI/StepperRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/StepperRenderer.cs
@@ -1,5 +1,6 @@
using System;
using System.ComponentModel;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/StreamImagesourceHandler.cs b/src/Compatibility/Core/src/WinUI/StreamImagesourceHandler.cs
index f5bd2dc9c311..3d92a21ddfa4 100644
--- a/src/Compatibility/Core/src/WinUI/StreamImagesourceHandler.cs
+++ b/src/Compatibility/Core/src/WinUI/StreamImagesourceHandler.cs
@@ -2,6 +2,7 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
+using Microsoft.Maui.Controls.Platform;
using Microsoft.UI.Xaml.Media.Imaging;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
diff --git a/src/Compatibility/Core/src/WinUI/SwipeViewRenderer.cs b/src/Compatibility/Core/src/WinUI/SwipeViewRenderer.cs
index f60fdb2bd6a3..ab836d21a30e 100644
--- a/src/Compatibility/Core/src/WinUI/SwipeViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/SwipeViewRenderer.cs
@@ -9,6 +9,7 @@
using WSwipeItem = Microsoft.UI.Xaml.Controls.SwipeItem;
using WSwipeMode = Microsoft.UI.Xaml.Controls.SwipeMode;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -131,7 +132,7 @@ protected override void UpdateBackgroundColor()
if (Control != null)
{
- Control.Background = backgroundColor.IsDefault() ? null : backgroundColor.ToBrush();
+ Control.Background = backgroundColor.IsDefault() ? null : Maui.ColorExtensions.ToNative(backgroundColor);
}
base.UpdateBackgroundColor();
@@ -256,10 +257,10 @@ void UpdateSwipeItem(SwipeItem formsSwipeItem)
{
windowsSwipeItem.Text = formsSwipeItem.Text;
windowsSwipeItem.IconSource = formsSwipeItem.IconImageSource.ToWindowsIconSource();
- windowsSwipeItem.Background = formsSwipeItem.BackgroundColor.ToBrush();
+ windowsSwipeItem.Background = Maui.ColorExtensions.ToNative(formsSwipeItem.BackgroundColor);
var textColor = GetSwipeItemColor(formsSwipeItem.BackgroundColor);
- windowsSwipeItem.Foreground = textColor.ToBrush();
+ windowsSwipeItem.Foreground = Maui.ColorExtensions.ToNative(textColor);
}
}
@@ -326,8 +327,8 @@ WSwipeItems CreateSwipeItems(SwipeDirection swipeDirection)
var windowsSwipeItem = new WSwipeItem
{
- Background = formsSwipeItem.BackgroundColor.IsDefault() ? null : formsSwipeItem.BackgroundColor.ToBrush(),
- Foreground = textColor.ToBrush(),
+ Background = formsSwipeItem.BackgroundColor.IsDefault() ? null : Maui.ColorExtensions.ToNative(formsSwipeItem.BackgroundColor),
+ Foreground = Maui.ColorExtensions.ToNative(textColor),
IconSource = formsSwipeItem.IconImageSource.ToWindowsIconSource(),
Text = !string.IsNullOrEmpty(formsSwipeItem.Text) ? formsSwipeItem.Text : string.Empty,
BehaviorOnInvoked = GetSwipeBehaviorOnInvoked(items.SwipeBehaviorOnInvoked)
diff --git a/src/Compatibility/Core/src/WinUI/SwitchRenderer.cs b/src/Compatibility/Core/src/WinUI/SwitchRenderer.cs
index 4b9e70ffd3b2..7384c740d52e 100644
--- a/src/Compatibility/Core/src/WinUI/SwitchRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/SwitchRenderer.cs
@@ -11,6 +11,7 @@
using WRectangle = Microsoft.UI.Xaml.Shapes.Rectangle;
using WSolidColorBrush = Microsoft.UI.Xaml.Media.SolidColorBrush;
using WVisualStateManager = Microsoft.UI.Xaml.VisualStateManager;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -199,7 +200,7 @@ void UpdateThumbColor()
if (!Element.ThumbColor.IsDefault())
{
- var brush = Element.ThumbColor.ToBrush();
+ var brush = Maui.ColorExtensions.ToNative(Element.ThumbColor);
brush.Opacity = _originalThumbOnBrush.Opacity;
frame.Value = brush;
}
@@ -218,7 +219,7 @@ void UpdateThumbColor()
_originalThumbOnBrush = thumb.Fill;
if (!Element.ThumbColor.IsDefault())
- thumb.Fill = Element.ThumbColor.ToBrush();
+ thumb.Fill = Maui.ColorExtensions.ToNative(Element.ThumbColor);
else
thumb.Fill = _originalThumbOnBrush;
}
diff --git a/src/Compatibility/Core/src/WinUI/TableViewRenderer.cs b/src/Compatibility/Core/src/WinUI/TableViewRenderer.cs
index 7cc8d7fe2e7b..67c5f1a82ada 100644
--- a/src/Compatibility/Core/src/WinUI/TableViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/TableViewRenderer.cs
@@ -4,6 +4,7 @@
using Microsoft.UI.Xaml.Data;
using WItemsControl = Microsoft.UI.Xaml.Controls.ItemsControl;
using WSelectionChangedEventArgs = Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/TextBlockExtensions.cs b/src/Compatibility/Core/src/WinUI/TextBlockExtensions.cs
index 557818e9bf97..27f0bd0530f2 100644
--- a/src/Compatibility/Core/src/WinUI/TextBlockExtensions.cs
+++ b/src/Compatibility/Core/src/WinUI/TextBlockExtensions.cs
@@ -2,7 +2,7 @@
using System.Linq;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Graphics;
-#if WINDOWS_UWP
+#if WINDOWS
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Documents;
using NativeSize = Windows.Foundation.Size;
@@ -12,7 +12,7 @@
using NativeSize = System.Windows.Size;
#endif
-#if WINDOWS_UWP
+#if WINDOWS
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
#else
namespace Microsoft.Maui.Controls.Compatibility.Platform.WPF
diff --git a/src/Compatibility/Core/src/WinUI/TimePickerRenderer.cs b/src/Compatibility/Core/src/WinUI/TimePickerRenderer.cs
index d274f869f26e..d8f1fcd14ea5 100644
--- a/src/Compatibility/Core/src/WinUI/TimePickerRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/TimePickerRenderer.cs
@@ -8,6 +8,7 @@
using Microsoft.UI.Xaml.Controls.Primitives;
using WBrush = Microsoft.UI.Xaml.Media.Brush;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -184,7 +185,7 @@ void UpdateCharacterSpacing()
void UpdateTextColor()
{
Color color = Element.TextColor;
- Control.Foreground = color.IsDefault() ? (_defaultBrush ?? color.ToBrush()) : color.ToBrush();
+ Control.Foreground = color.IsDefault() ? (_defaultBrush ?? Maui.ColorExtensions.ToNative(color)) : Maui.ColorExtensions.ToNative(color);
}
}
}
\ No newline at end of file
diff --git a/src/Compatibility/Core/src/WinUI/UriImageSourceHandler.cs b/src/Compatibility/Core/src/WinUI/UriImageSourceHandler.cs
index 3c79a5d69f6e..3bf5a21e9046 100644
--- a/src/Compatibility/Core/src/WinUI/UriImageSourceHandler.cs
+++ b/src/Compatibility/Core/src/WinUI/UriImageSourceHandler.cs
@@ -6,6 +6,7 @@
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/ViewRenderer.cs b/src/Compatibility/Core/src/WinUI/ViewRenderer.cs
index 7ee9e0934335..b6d0570ca664 100644
--- a/src/Compatibility/Core/src/WinUI/ViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/ViewRenderer.cs
@@ -1,5 +1,6 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Automation.Peers;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/VisualElementRenderer.cs b/src/Compatibility/Core/src/WinUI/VisualElementRenderer.cs
index eef5b8576ece..8139e4be3e6d 100644
--- a/src/Compatibility/Core/src/WinUI/VisualElementRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/VisualElementRenderer.cs
@@ -11,6 +11,7 @@
using WRect = Windows.Foundation.Rect;
using WSolidColorBrush = Microsoft.UI.Xaml.Media.SolidColorBrush;
using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
@@ -434,7 +435,8 @@ protected virtual void SetAutomationPropertiesLabeledBy()
if (Control == null)
return;
- _defaultAutomationPropertiesLabeledBy = Control.SetAutomationPropertiesLabeledBy(Element, _defaultAutomationPropertiesLabeledBy);
+ // TODO MAUI
+ _defaultAutomationPropertiesLabeledBy = Control.SetAutomationPropertiesLabeledBy(Element, null, _defaultAutomationPropertiesLabeledBy);
}
protected void SetNativeControl(TNativeElement control)
@@ -499,7 +501,7 @@ protected virtual void UpdateBackgroundColor()
{
if (!backgroundColor.IsDefault())
{
- _control.Background = backgroundColor.ToBrush();
+ _control.Background = Maui.ColorExtensions.ToNative(backgroundColor);
}
else
{
@@ -511,7 +513,7 @@ protected virtual void UpdateBackgroundColor()
{
if (!backgroundColor.IsDefault())
{
- backgroundLayer.Background = backgroundColor.ToBrush();
+ backgroundLayer.Background = Maui.ColorExtensions.ToNative(backgroundColor);
}
else
{
@@ -539,7 +541,7 @@ protected virtual void UpdateBackground()
else
{
if (!backgroundColor.IsDefault())
- _control.Background = backgroundColor.ToBrush();
+ _control.Background = Maui.ColorExtensions.ToNative(backgroundColor);
else
{
_control.ClearValue(Microsoft.UI.Xaml.Controls.Control.BackgroundProperty);
@@ -554,7 +556,7 @@ protected virtual void UpdateBackground()
else
{
if (!backgroundColor.IsDefault())
- backgroundLayer.Background = backgroundColor.ToBrush();
+ backgroundLayer.Background = Maui.ColorExtensions.ToNative(backgroundColor);
else
backgroundLayer.ClearValue(BackgroundProperty);
}
diff --git a/src/Compatibility/Core/src/WinUI/VisualElementTracker.cs b/src/Compatibility/Core/src/WinUI/VisualElementTracker.cs
index 636124dbbc55..ea1c54e9b847 100644
--- a/src/Compatibility/Core/src/WinUI/VisualElementTracker.cs
+++ b/src/Compatibility/Core/src/WinUI/VisualElementTracker.cs
@@ -202,7 +202,7 @@ void HandleDragStarting(UIElement sender, Microsoft.UI.Xaml.DragStartingEventArg
}
var renderer = sender as IVisualElementRenderer;
- var args = rec.SendDragStarting(renderer?.Element);
+ var args = rec.SendDragStarting(renderer?.Element as IView);
e.Data.Properties["_XFPropertes_DONTUSE"] = args.Data;
if (!args.Handled && renderer != null)
diff --git a/src/Compatibility/Core/src/WinUI/WebViewRenderer.cs b/src/Compatibility/Core/src/WinUI/WebViewRenderer.cs
index 0d06deda3d45..1a743cf314f4 100644
--- a/src/Compatibility/Core/src/WinUI/WebViewRenderer.cs
+++ b/src/Compatibility/Core/src/WinUI/WebViewRenderer.cs
@@ -12,9 +12,7 @@
using System.Linq;
using Microsoft.UI.Xaml.Controls;
using WWebView = Microsoft.UI.Xaml.Controls.WebView2;
-
-//TODO WINUI3
-//using WWebViewExecutionMode = Microsoft.UI.Xaml.Controls.WebViewExecutionMode;
+using Microsoft.Maui.Controls.Platform;
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
diff --git a/src/Compatibility/Core/src/WinUI/Extensions/WinUIHelpers.cs b/src/Compatibility/Core/src/WinUI/WinUIHelpers.cs
similarity index 91%
rename from src/Compatibility/Core/src/WinUI/Extensions/WinUIHelpers.cs
rename to src/Compatibility/Core/src/WinUI/WinUIHelpers.cs
index d63feb5fe6d1..0b7942dc87de 100644
--- a/src/Compatibility/Core/src/WinUI/Extensions/WinUIHelpers.cs
+++ b/src/Compatibility/Core/src/WinUI/WinUIHelpers.cs
@@ -10,7 +10,7 @@
namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
{
- public static class WinUIHelpers
+ static class WinUIHelpers
{
public static WThickness CreateThickness(double left, double top, double right, double bottom)
{
@@ -55,7 +55,7 @@ public static WCornerRadius CreateCornerRadius(double all)
};
}
- internal static WGridLength CreateGridLength(int v, UwpGridUnitType auto)
+ public static WGridLength CreateGridLength(int v, UwpGridUnitType auto)
{
return new WGridLength(v, auto);
}
diff --git a/src/Compatibility/Core/src/WinUI/WindowsBasePlatformServices.cs b/src/Compatibility/Core/src/WinUI/WindowsBasePlatformServices.cs
index 2974223ccacd..caeb71fa10fd 100644
--- a/src/Compatibility/Core/src/WinUI/WindowsBasePlatformServices.cs
+++ b/src/Compatibility/Core/src/WinUI/WindowsBasePlatformServices.cs
@@ -141,7 +141,7 @@ public Color GetNamedColor(string name)
if (!Microsoft.UI.Xaml.Application.Current?.Resources.ContainsKey(name) ?? true)
return KnownColor.Default;
- return ((Windows.UI.Color)Microsoft.UI.Xaml.Application.Current?.Resources[name]).ToFormsColor();
+ return ((Windows.UI.Color)Microsoft.UI.Xaml.Application.Current?.Resources[name]).ToColor();
}
public async Task GetStreamAsync(Uri uri, CancellationToken cancellationToken)
diff --git a/src/Compatibility/Core/src/iOS/RendererToHandlerShim.cs b/src/Compatibility/Core/src/iOS/RendererToHandlerShim.cs
index 886899c0c6f2..714072ceb2be 100644
--- a/src/Compatibility/Core/src/iOS/RendererToHandlerShim.cs
+++ b/src/Compatibility/Core/src/iOS/RendererToHandlerShim.cs
@@ -2,7 +2,6 @@
using ViewHandler = Microsoft.Maui.Handlers.ViewHandler;
using UIKit;
using Microsoft.Maui.Controls.Compatibility.Platform.iOS;
-using Microsoft.Maui.Handlers;
namespace Microsoft.Maui.Controls.Compatibility
{
@@ -21,7 +20,7 @@ public static IViewHandler CreateShim(object renderer)
return new RendererToHandlerShim();
}
- public RendererToHandlerShim() : base(Handlers.ViewHandler.ViewMapper)
+ public RendererToHandlerShim() : base(ViewHandler.ViewMapper)
{
}
diff --git a/src/Compatibility/Core/tests/WinUI/Compatibility.Windows.UnitTests.csproj b/src/Compatibility/Core/tests/WinUI/Compatibility.Windows.UnitTests.csproj
index 7e154921d89c..ebe7596c7dbe 100644
--- a/src/Compatibility/Core/tests/WinUI/Compatibility.Windows.UnitTests.csproj
+++ b/src/Compatibility/Core/tests/WinUI/Compatibility.Windows.UnitTests.csproj
@@ -4,7 +4,7 @@
10.0.17134.0
Microsoft.Maui.Controls.Compatibility.UAP.UnitTests
win10-x86;win10-x64;win10-arm64
- $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP;UWP_16299
+ $(DefineConstants);DEBUG;TRACE;NETFX_CORE;WINDOWS;UWP_16299
1701;1702;CS8305;8305;CA1416
@@ -62,7 +62,7 @@
full
false
bin\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
prompt
4
@@ -71,7 +71,7 @@
pdbonly
true
bin\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
prompt
4
@@ -79,7 +79,7 @@
x86
true
bin\x86\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
false
@@ -88,7 +88,7 @@
x86
bin\x86\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
@@ -99,7 +99,7 @@
ARM
true
bin\ARM\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
false
@@ -108,7 +108,7 @@
ARM
bin\ARM\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
@@ -119,7 +119,7 @@
ARM64
true
bin\ARM64\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
false
@@ -128,7 +128,7 @@
ARM64
bin\ARM64\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
@@ -139,7 +139,7 @@
x64
true
bin\x64\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
false
@@ -148,7 +148,7 @@
x64
bin\x64\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
diff --git a/src/Compatibility/Maps/src/UWP/Compatibility.Maps.UWP.csproj b/src/Compatibility/Maps/src/UWP/Compatibility.Maps.UWP.csproj
index e2437ce16ec6..d0200a24760e 100644
--- a/src/Compatibility/Maps/src/UWP/Compatibility.Maps.UWP.csproj
+++ b/src/Compatibility/Maps/src/UWP/Compatibility.Maps.UWP.csproj
@@ -8,12 +8,12 @@
false
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
true
bin\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
diff --git a/src/Controls/DualScreen/sample/DualScreen.UWP/DualScreen.UWP.csproj b/src/Controls/DualScreen/sample/DualScreen.UWP/DualScreen.UWP.csproj
index bc44d1067c54..9f1516b5fdd6 100644
--- a/src/Controls/DualScreen/sample/DualScreen.UWP/DualScreen.UWP.csproj
+++ b/src/Controls/DualScreen/sample/DualScreen.UWP/DualScreen.UWP.csproj
@@ -22,7 +22,7 @@
true
bin\ARM\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
ARM
@@ -32,7 +32,7 @@
bin\ARM\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
@@ -45,7 +45,7 @@
true
bin\x64\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
x64
@@ -55,7 +55,7 @@
bin\x64\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
@@ -68,7 +68,7 @@
true
bin\x86\Debug\
- DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP
+ DEBUG;TRACE;NETFX_CORE;WINDOWS
;2008
full
x86
@@ -78,7 +78,7 @@
bin\x86\Release\
- TRACE;NETFX_CORE;WINDOWS_UWP
+ TRACE;NETFX_CORE;WINDOWS
true
;2008
pdbonly
diff --git a/src/Controls/samples/Controls.Sample.iOS/Controls.Sample.iOS.csproj b/src/Controls/samples/Controls.Sample.iOS/Controls.Sample.iOS.csproj
index 3369fef720b3..9d2c1bb42bd8 100644
--- a/src/Controls/samples/Controls.Sample.iOS/Controls.Sample.iOS.csproj
+++ b/src/Controls/samples/Controls.Sample.iOS/Controls.Sample.iOS.csproj
@@ -70,9 +70,6 @@
-
-
-
diff --git a/src/Controls/samples/Controls.Sample/Controls.Sample.csproj b/src/Controls/samples/Controls.Sample/Controls.Sample.csproj
index ed0ef7d6176f..7c40fe15a6aa 100644
--- a/src/Controls/samples/Controls.Sample/Controls.Sample.csproj
+++ b/src/Controls/samples/Controls.Sample/Controls.Sample.csproj
@@ -1,7 +1,7 @@
- MonoAndroid10.0;Xamarin.iOS10
+ $(NonNet6Platforms)
diff --git a/src/Controls/samples/Controls.Sample/Maui.Controls.Sample-net6.csproj b/src/Controls/samples/Controls.Sample/Maui.Controls.Sample-net6.csproj
index 98d6be1d4af4..ba140880f3ca 100644
--- a/src/Controls/samples/Controls.Sample/Maui.Controls.Sample-net6.csproj
+++ b/src/Controls/samples/Controls.Sample/Maui.Controls.Sample-net6.csproj
@@ -11,7 +11,7 @@
$(NoWarn);CA1416;CS8305
- $(DefineConstants);WINDOWS_UWP;WINDOWS
+ $(DefineConstants);WINDOWS
diff --git a/src/Controls/samples/Controls.Sample/Pages/MainPage.cs b/src/Controls/samples/Controls.Sample/Pages/MainPage.cs
index 274fa12cf537..28e09a530b1e 100644
--- a/src/Controls/samples/Controls.Sample/Pages/MainPage.cs
+++ b/src/Controls/samples/Controls.Sample/Pages/MainPage.cs
@@ -20,6 +20,13 @@ public class MainPage : BasePage
public MainPage(IServiceProvider services, MainPageViewModel viewModel)
{
+ BackgroundColor = Colors.White;
+ ToolbarItems.Add(new ToolbarItem()
+ {
+ Text = "Page"
+ });
+
+ Title = "Welcome to the Samples";
_services = services;
BindingContext = _viewModel = viewModel;
@@ -58,6 +65,15 @@ void SetupMauiLayout()
verticalStack.Add(new Label { Text = "This should be BOLD text!", FontAttributes = FontAttributes.Bold, HorizontalOptions = LayoutOptions.Center });
verticalStack.Add(new Label { Text = "This should have character spacing!", CharacterSpacing = 3 });
verticalStack.Add(new Label { Text = "This should be a CUSTOM font!", FontFamily = "Dokdo" });
+ verticalStack.Add(
+ new Button {
+ Text = "Push a Page",
+ Command = new Command(async () =>
+ {
+ await Navigation.PushAsync(new SemanticsPage());
+ })
+ }
+ );
#if __ANDROID__
diff --git a/src/Controls/samples/Controls.Sample/Pages/NavPage.cs b/src/Controls/samples/Controls.Sample/Pages/NavPage.cs
new file mode 100644
index 000000000000..baa61ee0e462
--- /dev/null
+++ b/src/Controls/samples/Controls.Sample/Pages/NavPage.cs
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Maui.Controls.Sample.ViewModel;
+using Microsoft.Maui.Controls;
+
+namespace Maui.Controls.Sample.Pages
+{
+ public class NavPage : NavigationPage
+ {
+ public NavPage(IServiceProvider services, MainPageViewModel viewModel) :
+ base(new MainPage(services, viewModel))
+ {
+ ToolbarItems.Add(new ToolbarItem()
+ {
+ Text = "Nav Page"
+ });
+
+ }
+ }
+}
diff --git a/src/Controls/samples/Controls.Sample/Pages/SemanticsPage.xaml b/src/Controls/samples/Controls.Sample/Pages/SemanticsPage.xaml
index e720e8260783..713349e075e7 100644
--- a/src/Controls/samples/Controls.Sample/Pages/SemanticsPage.xaml
+++ b/src/Controls/samples/Controls.Sample/Pages/SemanticsPage.xaml
@@ -1,7 +1,8 @@
+ x:Class="Maui.Controls.Sample.Pages.SemanticsPage"
+ BackgroundColor="White">
diff --git a/src/Controls/samples/Controls.Sample/Startup.cs b/src/Controls/samples/Controls.Sample/Startup.cs
index 02d416dacea1..97af005435dc 100644
--- a/src/Controls/samples/Controls.Sample/Startup.cs
+++ b/src/Controls/samples/Controls.Sample/Startup.cs
@@ -12,6 +12,7 @@
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Maui;
using Microsoft.Maui.Controls.Compatibility;
+using Microsoft.Maui.Controls.Hosting;
using Microsoft.Maui.Essentials;
using Microsoft.Maui.Hosting;
using Microsoft.Maui.LifecycleEvents;
@@ -20,8 +21,8 @@ namespace Maui.Controls.Sample
{
public class Startup : IStartup
{
- enum PageType { Xaml, Semantics, Main, Blazor }
- private PageType _pageType = PageType.Main;
+ enum PageType { Xaml, Semantics, Main, Blazor, NavigationPage }
+ private PageType _pageType = PageType.NavigationPage;
public readonly static bool UseXamlApp = true;
@@ -45,6 +46,7 @@ public void Configure(IAppHostBuilder appBuilder)
appBuilder.EnableHotReload();
#endif
appBuilder
+ .UseMauiControlsHandlers()
#if NET6_0_OR_GREATER
.RegisterBlazorMauiWebView()
#endif
@@ -69,6 +71,7 @@ public void Configure(IAppHostBuilder appBuilder)
serviceType: typeof(IPage),
implementationType: _pageType switch
{
+ PageType.NavigationPage => typeof(NavPage),
PageType.Xaml => typeof(XamlPage),
PageType.Semantics => typeof(SemanticsPage),
PageType.Blazor =>
diff --git a/src/Controls/src/Core/AppHostBuilderExtensions.cs b/src/Controls/src/Core/AppHostBuilderExtensions.cs
new file mode 100644
index 000000000000..85b3069435cb
--- /dev/null
+++ b/src/Controls/src/Core/AppHostBuilderExtensions.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Collections.Generic;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Maui.Controls.Handlers;
+using Microsoft.Maui.Hosting;
+
+namespace Microsoft.Maui.Controls.Hosting
+{
+ public static class AppHostBuilderExtensions
+ {
+ static readonly Dictionary DefaultMauiControlHandlers = new Dictionary
+ {
+ { typeof(NavigationPage), typeof(NavigationPageHandler) },
+ };
+
+ public static IAppHostBuilder UseMauiControlsHandlers(this IAppHostBuilder builder)
+ {
+ return builder
+ .ConfigureMauiHandlers((_, handlersCollection) => handlersCollection.AddHandlers(DefaultMauiControlHandlers))
+ .ConfigureServices(ConfigureNativeServices);
+ }
+
+ private static void ConfigureNativeServices(HostBuilderContext arg1, IServiceCollection arg2)
+ {
+#if WINDOWS
+ if (!UI.Xaml.Application.Current.Resources.ContainsKey("MauiControlsPageControlStyle"))
+ {
+ var myResourceDictionary = new Microsoft.UI.Xaml.ResourceDictionary();
+ myResourceDictionary.Source = new Uri("ms-appx:///Microsoft.Maui.Controls/Maui/Platform/Windows/Styles/Resources.xbf");
+ Microsoft.UI.Xaml.Application.Current.Resources.MergedDictionaries.Add(myResourceDictionary);
+ }
+#endif
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Application.cs b/src/Controls/src/Core/Application.cs
index 47d4a606e34f..6a1372ea2a5d 100644
--- a/src/Controls/src/Core/Application.cs
+++ b/src/Controls/src/Core/Application.cs
@@ -321,13 +321,17 @@ protected virtual void OnStart()
{
}
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static void ClearCurrent() => Current = null;
+ internal static void ClearCurrent() => Current = null;
[EditorBrowsable(EditorBrowsableState.Never)]
public static bool IsApplicationOrNull(Element element)
{
- return element == null || element is Application;
+ return element == null || element is Application || element is IWindow;
+ }
+
+ internal static bool IsApplicationOrNull(IView element)
+ {
+ return element == null || element is Application || element is IWindow;
}
internal override void OnParentResourcesChanged(IEnumerable> values)
diff --git a/src/Controls/src/Core/ArrayExtensions.cs b/src/Controls/src/Core/ArrayExtensions.cs
new file mode 100644
index 000000000000..c3433082f1a7
--- /dev/null
+++ b/src/Controls/src/Core/ArrayExtensions.cs
@@ -0,0 +1,39 @@
+using System;
+using Microsoft.Maui.Controls.Internals;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class ArrayExtensions
+ {
+ public static T[] Insert(this T[] self, int index, T item)
+ {
+ var result = new T[self.Length + 1];
+ if (index > 0)
+ Array.Copy(self, result, index);
+
+ result[index] = item;
+
+ if (index < self.Length)
+ Array.Copy(self, index, result, index + 1, result.Length - index - 1);
+
+ return result;
+ }
+
+ public static T[] Remove(this T[] self, T item)
+ {
+ return self.RemoveAt(self.IndexOf(item));
+ }
+
+ public static T[] RemoveAt(this T[] self, int index)
+ {
+ var result = new T[self.Length - 1];
+ if (index > 0)
+ Array.Copy(self, result, index);
+
+ if (index < self.Length - 1)
+ Array.Copy(self, index + 1, result, index, self.Length - index - 1);
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/ColorExtensions.Windows.cs b/src/Controls/src/Core/ColorExtensions.Windows.cs
new file mode 100644
index 000000000000..236067522af8
--- /dev/null
+++ b/src/Controls/src/Core/ColorExtensions.Windows.cs
@@ -0,0 +1,28 @@
+using System;
+using Windows.UI;
+using Microsoft.UI;
+using Microsoft.Maui.Graphics;
+using WBrush = Microsoft.UI.Xaml.Media.Brush;
+using WSolidColorBrush = Microsoft.UI.Xaml.Media.SolidColorBrush;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public static partial class ColorExtensions
+ {
+ [Obsolete("ToBrush is obsolete. Please use ToNative instead")]
+ public static WBrush ToBrush(this Graphics.Color color) => color.ToNative();
+
+
+ [Obsolete("ToFormsColor is obsolete. Please use ToColor instead")]
+ public static Graphics.Color ToFormsColor(this Windows.UI.Color color)
+ {
+ return color.ToColor();
+ }
+
+ [Obsolete("ToFormsColor is obsolete. Please use ToColor instead")]
+ public static Graphics.Color ToFormsColor(this WSolidColorBrush solidColorBrush)
+ {
+ return solidColorBrush.Color.ToColor();
+ }
+ }
+}
diff --git a/src/Controls/src/Core/ColorExtensions.cs b/src/Controls/src/Core/ColorExtensions.cs
index dc37ac04143c..3cca6fc50372 100644
--- a/src/Controls/src/Core/ColorExtensions.cs
+++ b/src/Controls/src/Core/ColorExtensions.cs
@@ -2,7 +2,7 @@
namespace Microsoft.Maui.Controls
{
- public static class ColorExtensions
+ public static partial class ColorExtensions
{
public static bool IsDefault(this Graphics.Color color)
{
@@ -14,16 +14,5 @@ public static bool IsNotDefault(this Graphics.Color color)
return !IsDefault(color);
}
}
-
- public static class KnownColor
- {
- public static Color Default => null;
-
- public static Color Transparent { get; } = new(255, 255, 255, 0);
-
- public static void SetAccent(Color value) => Accent = value;
-
- public static Color Accent { get; internal set; }
- }
}
diff --git a/src/Controls/src/Core/Controls.Core-net6.csproj b/src/Controls/src/Core/Controls.Core-net6.csproj
index ec5841e72792..d7927fe6be94 100644
--- a/src/Controls/src/Core/Controls.Core-net6.csproj
+++ b/src/Controls/src/Core/Controls.Core-net6.csproj
@@ -8,14 +8,12 @@
Microsoft.Maui.Controls
+
-
-
-
diff --git a/src/Controls/src/Core/Controls.Core.csproj b/src/Controls/src/Core/Controls.Core.csproj
index 00b146aafa64..98ca65bb0b44 100644
--- a/src/Controls/src/Core/Controls.Core.csproj
+++ b/src/Controls/src/Core/Controls.Core.csproj
@@ -1,11 +1,12 @@
-
+
- netstandard2.1;netstandard2.0
+ netstandard2.1;netstandard2.0;$(NonNet6Platforms)
Microsoft.Maui.Controls
Microsoft.Maui.Controls
+
diff --git a/src/Controls/src/Core/DragAndDrop/DragGestureRecognizer.cs b/src/Controls/src/Core/DragAndDrop/DragGestureRecognizer.cs
index cf96e22d0fb2..11ac65ddaff0 100644
--- a/src/Controls/src/Core/DragAndDrop/DragGestureRecognizer.cs
+++ b/src/Controls/src/Core/DragAndDrop/DragGestureRecognizer.cs
@@ -79,7 +79,7 @@ public void SendDropCompleted(DropCompletedEventArgs args)
}
[EditorBrowsable(EditorBrowsableState.Never)]
- public DragStartingEventArgs SendDragStarting(VisualElement element)
+ public DragStartingEventArgs SendDragStarting(IView element)
{
var args = new DragStartingEventArgs();
diff --git a/src/Controls/src/Core/DragAndDrop/DropGestureRecognizer.cs b/src/Controls/src/Core/DragAndDrop/DropGestureRecognizer.cs
index 9b03fd2abc05..121f60fcf35a 100644
--- a/src/Controls/src/Core/DragAndDrop/DropGestureRecognizer.cs
+++ b/src/Controls/src/Core/DragAndDrop/DropGestureRecognizer.cs
@@ -99,13 +99,13 @@ public async Task SendDrop(DropEventArgs args)
{
var dataView = args.Data;
var internalProperties = dataView.PropertiesInternal;
- VisualElement dragSource = null;
+ IView dragSource = null;
ImageSource sourceTarget = await dataView.GetImageAsync();
string text = await dataView.GetTextAsync();
if (internalProperties.ContainsKey("DragSource"))
{
- dragSource = (VisualElement)internalProperties["DragSource"];
+ dragSource = (IView)internalProperties["DragSource"];
if (sourceTarget == null && dragSource is IImageElement imageElement)
sourceTarget = imageElement.Source;
diff --git a/src/Controls/src/Core/HandlerImpl/ContentPage.Impl.cs b/src/Controls/src/Core/HandlerImpl/ContentPage.Impl.cs
index c1e874f3e891..70f5b897d1a2 100644
--- a/src/Controls/src/Core/HandlerImpl/ContentPage.Impl.cs
+++ b/src/Controls/src/Core/HandlerImpl/ContentPage.Impl.cs
@@ -10,9 +10,6 @@ public partial class ContentPage : IPage, HotReload.IHotReloadableView
// TODO ezhart That there's a layout alignment here tells us this hierarchy needs work :)
public Primitives.LayoutAlignment HorizontalLayoutAlignment => Primitives.LayoutAlignment.Fill;
- // TODO ezhart super sus
- public Thickness Margin => Thickness.Zero;
-
IView IPage.Content => Content;
diff --git a/src/Controls/src/Core/HandlerImpl/NavigationPage.Impl.cs b/src/Controls/src/Core/HandlerImpl/NavigationPage.Impl.cs
new file mode 100644
index 000000000000..d0b6739f12ac
--- /dev/null
+++ b/src/Controls/src/Core/HandlerImpl/NavigationPage.Impl.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Graphics;
+
+namespace Microsoft.Maui.Controls
+{
+ public partial class NavigationPage : IView
+ {
+ Thickness IView.Margin => Thickness.Zero;
+
+ protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
+ {
+ if (Content is IFrameworkElement frameworkElement)
+ {
+ frameworkElement.Measure(widthConstraint, heightConstraint);
+ }
+
+ return new Size(widthConstraint, heightConstraint);
+ }
+
+ protected override Size ArrangeOverride(Rectangle bounds)
+ {
+ // Update the Bounds (Frame) for this page
+ Layout(bounds);
+
+ if (Content is IFrameworkElement element)
+ {
+ element.Arrange(bounds);
+ element.Handler?.SetFrame(element.Frame);
+ }
+
+ return Frame.Size;
+ }
+
+ IFrameworkElement Content =>
+ this.CurrentPage;
+ }
+
+}
diff --git a/src/Controls/src/Core/HandlerImpl/Page.Impl.cs b/src/Controls/src/Core/HandlerImpl/Page.Impl.cs
index dc763c856793..0f1483000e6c 100644
--- a/src/Controls/src/Core/HandlerImpl/Page.Impl.cs
+++ b/src/Controls/src/Core/HandlerImpl/Page.Impl.cs
@@ -1,13 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
+using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Graphics;
namespace Microsoft.Maui.Controls
{
public partial class Page : IPage
{
- IView IPage.Content => throw new NotImplementedException();
+ IView IPage.Content => null;
- Thickness IView.Margin => Thickness.Zero;
+ // TODO ezhart super sus
+ public Thickness Margin => Thickness.Zero;
}
}
diff --git a/src/Controls/src/Core/HandlerImpl/RadioButton.Impl.cs b/src/Controls/src/Core/HandlerImpl/RadioButton.Impl.cs
new file mode 100644
index 000000000000..b894ec203bb0
--- /dev/null
+++ b/src/Controls/src/Core/HandlerImpl/RadioButton.Impl.cs
@@ -0,0 +1,6 @@
+namespace Microsoft.Maui.Controls
+{
+ public partial class RadioButton : IRadioButton
+ {
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Android.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Android.cs
new file mode 100644
index 000000000000..dc9f1cd96874
--- /dev/null
+++ b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Android.cs
@@ -0,0 +1,1432 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Threading.Tasks;
+using Android.Animation;
+using Android.App;
+using Android.Content;
+using Android.Content.Res;
+using Android.Graphics;
+using Android.Graphics.Drawables;
+using Android.Runtime;
+using Android.Util;
+using Android.Views;
+using Android.Widget;
+using AndroidX.AppCompat.App;
+using AndroidX.AppCompat.Graphics.Drawable;
+using AndroidX.DrawerLayout.Widget;
+using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Controls.Platform;
+using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Handlers;
+using static Android.Views.View;
+using static Microsoft.Maui.Controls.PlatformConfiguration.AndroidSpecific.AppCompat.NavigationPage;
+using ActionBarDrawerToggle = AndroidX.AppCompat.App.ActionBarDrawerToggle;
+using AToolbar = AndroidX.AppCompat.Widget.Toolbar;
+using AView = Android.Views.View;
+using Color = Microsoft.Maui.Graphics.Color;
+using Fragment = AndroidX.Fragment.App.Fragment;
+using FragmentManager = AndroidX.Fragment.App.FragmentManager;
+using FragmentTransaction = AndroidX.Fragment.App.FragmentTransaction;
+using Object = Java.Lang.Object;
+
+using AndroidX.Navigation.Fragment;
+using AndroidX.Navigation;
+using Android.OS;
+using AndroidX.AppCompat.Widget;
+using AndroidX.Lifecycle;
+
+namespace Microsoft.Maui.Controls.Handlers
+{
+ public partial class NavigationPageHandler :
+ ViewHandler//, IManageFragments, IOnClickListener, ILifeCycleState
+ {
+ NavHostFragment NavHost { get; set; }
+
+ FragmentNavigator FragmentNavigator { get; set; }
+
+ protected override AView CreateNativeView()
+ {
+ LayoutInflater li = LayoutInflater.From(Context);
+ var view = li.Inflate(Resource.Layout.navigationlayout, null).JavaCast();
+ return view;
+ }
+
+ protected override void ConnectHandler(AView nativeView)
+ {
+ NavHost = (NavHostFragment)
+ Context
+ .GetFragmentManager()
+ .FindFragmentById(Resource.Id.nav_host);
+
+ FragmentNavigator =
+ (FragmentNavigator)NavHost
+ .NavController
+ .NavigatorProvider
+ .GetNavigator(Java.Lang.Class.FromType(typeof(FragmentNavigator)));
+
+
+ var navGraphNavigator =
+ (NavGraphNavigator)NavHost
+ .NavController
+ .NavigatorProvider
+ .GetNavigator(Java.Lang.Class.FromType(typeof(NavGraphNavigator)));
+
+ base.ConnectHandler(nativeView);
+
+ var navController = (INavigationPageController)VirtualView;
+ navController.PushRequested += OnPushed;
+ navController.PopRequested += OnPopped;
+
+ var inflater = NavHost.NavController.NavInflater;
+ NavGraph graph = new NavGraph(navGraphNavigator);
+ System.Diagnostics.Debug.WriteLine($"RABBIT {graph.NavigatorName}");
+
+ NavDestination navDestination = null;
+ List destinations = new List();
+ foreach(var page in VirtualView.Navigation.NavigationStack)
+ {
+ navDestination =
+ MauiFragmentNavDestination.
+ AddDestination(
+ page,
+ this,
+ graph,
+ FragmentNavigator);
+
+ destinations.Add(navDestination.Id);
+ }
+
+ graph.StartDestination = destinations[0];
+ NavHost.NavController.SetGraph(graph, null);
+
+ for (var i = 1; i < destinations.Count; i++)
+ {
+ var dest = destinations[i];
+ NavHost.NavController.Navigate(dest);
+ }
+ }
+
+ protected override void DisconnectHandler(AView nativeView)
+ {
+ base.DisconnectHandler(nativeView);
+ var navController = (INavigationPageController)VirtualView;
+ navController.PushRequested -= OnPushed;
+ navController.PopRequested -= OnPopped;
+ }
+
+ void OnPushed(object sender, NavigationRequestedEventArgs e)
+ {
+ var destination =
+ MauiFragmentNavDestination.AddDestination(e.Page, this, NavHost.NavController.Graph, FragmentNavigator);
+
+ NavHost.NavController.Navigate(destination.Id, null);
+ }
+
+ internal void OnPop()
+ {
+ NavHost.NavController.NavigateUp();
+ }
+
+
+ private void OnPopped(object sender, NavigationRequestedEventArgs e)
+ {
+ OnPop();
+ }
+
+
+
+ // public Task PopToRootAsync(Page page, bool animated = true)
+ // {
+ // return OnPopToRootAsync(page, animated);
+ // }
+
+ // public Task PopViewAsync(Page page, bool animated = true)
+ // {
+ // return OnPopViewAsync(page, animated);
+ // }
+
+ // public Task PushViewAsync(Page page, bool animated = true)
+ // {
+ // return OnPushAsync(page, animated);
+ // }
+
+ // void InsertPageBefore(Page page, Page before)
+ // {
+ // if (!_isAttachedToWindow)
+ // PushCurrentPages();
+
+ // UpdateToolbar();
+
+ // int index = PageController.InternalChildren.IndexOf(before);
+ // if (index == -1)
+ // throw new InvalidOperationException("This should never happen, please file a bug");
+
+ // Fragment fragment = FragmentContainer.CreateInstance(page);
+ // _fragmentStack.Insert(index, fragment);
+ // }
+
+ // void OnInsertPageBeforeRequested(object sender, NavigationRequestedEventArgs e)
+ // {
+ // InsertPageBefore(e.Page, e.BeforePage);
+ // }
+
+ // void OnPopped(object sender, NavigationRequestedEventArgs e)
+ // {
+ // e.Task = PopViewAsync(e.Page, e.Animated);
+ // }
+
+ // void OnPoppedToRoot(object sender, NavigationRequestedEventArgs e)
+ // {
+ // e.Task = PopToRootAsync(e.Page, e.Animated);
+ // }
+
+ // protected virtual Task OnPopToRootAsync(Page page, bool animated)
+ // {
+ // return SwitchContentAsync(page, animated, true, true);
+ // }
+
+ // protected virtual Task OnPopViewAsync(Page page, bool animated)
+ // {
+ // Page pageToShow = NavigationPageController.Peek(1);
+ // if (pageToShow == null)
+ // return Task.FromResult(false);
+
+ // return SwitchContentAsync(pageToShow, animated, true);
+ // }
+
+ // protected virtual Task OnPushAsync(Page view, bool animated)
+ // {
+ // return SwitchContentAsync(view, animated);
+ // }
+
+ // void OnPushed(object sender, NavigationRequestedEventArgs e)
+ // {
+ // e.Task = PushViewAsync(e.Page, e.Animated);
+ // }
+
+ // void OnRemovePageRequested(object sender, NavigationRequestedEventArgs e)
+ // {
+ // RemovePage(e.Page);
+ // }
+
+ // Fragment GetNavHostPageFragment(Page page)
+ // {
+ // for (int n = 0; n < _fragmentStack.Count; n++)
+ // {
+ // if ((_fragmentStack[n] as FragmentContainer)?.Page == page)
+ // {
+ // return _fragmentStack[n];
+ // }
+ // }
+
+ // return null;
+ // }
+
+ // void RemovePage(Page page)
+ // {
+ // if (!_isAttachedToWindow)
+ // PushCurrentPages();
+
+ // Fragment fragment = GetNavHostPageFragment(page);
+
+ // if (fragment == null)
+ // {
+ // return;
+ // }
+
+ //#if DEBUG
+ // // Enables logging of moveToState operations to logcat
+ //#pragma warning disable CS0618 // Type or member is obsolete
+ // FragmentManager.EnableDebugLogging(true);
+ //#pragma warning restore CS0618 // Type or member is obsolete
+ //#endif
+
+ // // Go ahead and take care of the fragment bookkeeping for the page being removed
+ // FragmentTransaction transaction = FragmentManager.BeginTransactionEx();
+ // transaction.RemoveEx(fragment);
+ // transaction.CommitAllowingStateLossEx();
+
+ // // And remove the fragment from our own stack
+ // _fragmentStack.Remove(fragment);
+
+ // Device.StartTimer(TimeSpan.FromMilliseconds(10), () =>
+ // {
+ // UpdateToolbar();
+ // return false;
+ // });
+ // }
+
+ // void PushCurrentPages()
+ // {
+ // if (_fragmentStack.Count > 0)
+ // return;
+
+ // foreach (Page page in NavigationPageController.Pages)
+ // {
+ // PushViewAsync(page, false);
+ // }
+ // }
+
+ // Task SwitchContentAsync(Page page, bool animated, bool removed = false, bool popToRoot = false)
+ // {
+ // if (!VirtualView.IsAttachedToRoot())
+ // return Task.FromResult(false);
+
+ // var tcs = new TaskCompletionSource();
+ // Fragment fragment = GetFragment(page, removed, popToRoot);
+
+ //#if DEBUG
+ // // Enables logging of moveToState operations to logcat
+ //#pragma warning disable CS0618 // Type or member is obsolete
+ // FragmentManager.EnableDebugLogging(true);
+ //#pragma warning restore CS0618 // Type or member is obsolete
+ //#endif
+
+ // Current?.SendDisappearing();
+ // Current = page;
+
+ // if (Platform != null)
+ // {
+ // Platform.NavAnimationInProgress = true;
+ // }
+
+ // FragmentTransaction transaction = FragmentManager.BeginTransactionEx();
+
+ // if (animated)
+ // SetupPageTransition(transaction, !removed);
+
+ // var fragmentsToRemove = new List();
+
+ // if (_fragmentStack.Count == 0)
+ // {
+ // transaction.AddEx(Id, fragment);
+ // _fragmentStack.Add(fragment);
+ // }
+ // else
+ // {
+ // if (removed)
+ // {
+ // // pop only one page, or pop everything to the root
+ // var popPage = true;
+ // while (_fragmentStack.Count > 1 && popPage)
+ // {
+ // Fragment currentToRemove = _fragmentStack.Last();
+ // _fragmentStack.RemoveAt(_fragmentStack.Count - 1);
+ // transaction.HideEx(currentToRemove);
+ // fragmentsToRemove.Add(currentToRemove);
+ // popPage = popToRoot;
+ // }
+
+ // Fragment toShow = _fragmentStack.Last();
+ // // Execute pending transactions so that we can be sure the fragment list is accurate.
+ // FragmentManager.ExecutePendingTransactionsEx();
+ // if (FragmentManager.Fragments.Contains(toShow))
+ // transaction.ShowEx(toShow);
+ // else
+ // transaction.AddEx(Id, toShow);
+ // }
+ // else
+ // {
+ // // push
+ // Fragment currentToHide = _fragmentStack.Last();
+ // transaction.HideEx(currentToHide);
+ // transaction.AddEx(Id, fragment);
+ // _fragmentStack.Add(fragment);
+ // }
+ // }
+
+ // // We don't currently support fragment restoration, so we don't need to worry about
+ // // whether the commit loses state
+ // transaction.CommitAllowingStateLossEx();
+
+ // // The fragment transitions don't really SUPPORT telling you when they end
+ // // There are some hacks you can do, but they actually are worse than just doing this:
+
+ // if (animated)
+ // {
+ // if (!removed)
+ // {
+ // UpdateToolbar();
+ // if (_drawerToggle != null && NavigationPageController.StackDepth == 2 && NavigationPage.GetHasBackButton(page))
+ // AnimateArrowIn();
+ // }
+ // else if (_drawerToggle != null && NavigationPageController.StackDepth == 2 && NavigationPage.GetHasBackButton(page))
+ // AnimateArrowOut();
+
+ // AddTransitionTimer(tcs, fragment, FragmentManager, fragmentsToRemove, TransitionDuration, removed);
+ // }
+ // else
+ // AddTransitionTimer(tcs, fragment, FragmentManager, fragmentsToRemove, 1, true);
+
+ // Context.HideKeyboard(this);
+
+ // if (Platform != null)
+ // {
+ // Platform.NavAnimationInProgress = false;
+ // }
+
+ // return tcs.Task;
+ // }
+
+
+ void UpdatePadding()
+ {
+ }
+ void UpdateTitleColor()
+ {
+ }
+ void UpdateNavigationBarBackground()
+ {
+ }
+ void UpdateTitleIcon()
+ {
+ }
+ void UpdateTitleView()
+ {
+ }
+
+
+ public static void MapPadding(NavigationPageHandler handler, NavigationPage view)
+ => handler.UpdatePadding();
+
+ public static void MapTitleColor(NavigationPageHandler handler, NavigationPage view)
+ => handler.UpdateTitleColor();
+
+ public static void MapNavigationBarBackground(NavigationPageHandler handler, NavigationPage view)
+ => handler.UpdateNavigationBarBackground();
+
+ // TODO MAUI: Task Based Mappers?
+ public static void MapTitleIcon(NavigationPageHandler handler, NavigationPage view)
+ => handler.UpdateTitleIcon();
+
+ public static void MapTitleView(NavigationPageHandler handler, NavigationPage view)
+ => handler.UpdateTitleView();
+
+
+ // protected override void ConnectHandler(AView nativeView)
+ // {
+ // base.ConnectHandler(nativeView);
+
+ // var navController = (INavigationPageController)VirtualView;
+
+ // navController.PushRequested += OnPushed;
+ // navController.PopRequested += OnPopped;
+ // navController.PopToRootRequested += OnPoppedToRoot;
+ // navController.InsertPageBeforeRequested += OnInsertPageBeforeRequested;
+ // navController.RemovePageRequested += OnRemovePageRequested;
+
+ // if (_isAttachedToWindow && VirtualView.IsAttachedToRoot())
+ // {
+ // PushCurrentPages();
+ // }
+ // }
+
+
+ // protected override void DisconnectHandler(AView nativeView)
+ // {
+ // base.DisconnectHandler(nativeView);
+
+ // var navController = (INavigationPageController)VirtualView;
+ // navController.PushRequested -= OnPushed;
+ // navController.PopRequested -= OnPopped;
+ // navController.PopToRootRequested -= OnPoppedToRoot;
+ // navController.InsertPageBeforeRequested -= OnInsertPageBeforeRequested;
+ // navController.RemovePageRequested -= OnRemovePageRequested;
+ // }
+
+
+
+ // OLD CODE BEING PULLED APART
+ // readonly List _fragmentStack = new List();
+
+ // Drawable _backgroundDrawable;
+ // Page _current;
+
+ // bool _disposed;
+ // ActionBarDrawerToggle _drawerToggle;
+ // FragmentManager _fragmentManager;
+ // int _lastActionBarHeight = -1;
+ // int _statusbarHeight;
+ // AToolbar _toolbar;
+ // ToolbarTracker _toolbarTracker;
+ // DrawerMultiplexedListener _drawerListener;
+ // DrawerLayout _drawerLayout;
+ // FlyoutPage _flyoutPage;
+ // bool _toolbarVisible;
+ // IVisualElementRenderer _titleViewRenderer;
+ // Container _titleView;
+ // ImageView _titleIconView;
+ // ImageSource _imageSource;
+ // bool _isAttachedToWindow;
+ // Platform _platform;
+ // string _defaultNavigationContentDescription;
+ // List _currentMenuItems = new List();
+ // List _currentToolbarItems = new List();
+
+ // // The following is based on https://android.googlesource.com/platform/frameworks/support.git/+/4a7e12af4ec095c3a53bb8481d8d92f63157c3b7/v4/java/android/support/v4/app/FragmentManager.java#677
+ // // Must be overriden in a custom renderer to match durations in XML animation resource files
+ // protected virtual int TransitionDuration { get; set; } = 220;
+ // bool ILifeCycleState.MarkedForDispose { get; set; } = false;
+
+ // public NavigationPageRenderer(Context context) : base(context)
+ // {
+ // AutoPackage = false;
+ // Id = Platform.GenerateViewId();
+ // Device.Info.PropertyChanged += DeviceInfoPropertyChanged;
+ // }
+
+ // INavigationPageController NavigationPageController => VirtualView as INavigationPageController;
+
+ // Platform Platform
+ // {
+ // get
+ // {
+ // if (_platform == null)
+ // {
+ // if (Context.GetActivity() is FormsAppCompatActivity activity)
+ // {
+ // _platform = activity.Platform;
+ // }
+ // }
+
+ // return _platform;
+ // }
+ // }
+
+ // internal int ContainerTopPadding { get; set; }
+ // internal int ContainerBottomPadding { get; set; }
+
+ // Page Current
+ // {
+ // get { return _current; }
+ // set
+ // {
+ // if (_current == value)
+ // return;
+
+ // if (_current != null)
+ // _current.PropertyChanged -= CurrentOnPropertyChanged;
+
+ // _current = value;
+
+ // if (_current != null)
+ // {
+ // _current.PropertyChanged += CurrentOnPropertyChanged;
+ // ToolbarVisible = NavigationPage.GetHasNavigationBar(_current);
+ // }
+ // }
+ // }
+
+ // FragmentManager FragmentManager => _fragmentManager ?? (_fragmentManager = Context.GetFragmentManager());
+
+ // IPageController PageController => VirtualView;
+
+ // bool ToolbarVisible
+ // {
+ // get { return _toolbarVisible; }
+ // set
+ // {
+ // if (_toolbarVisible == value)
+ // return;
+
+ // _toolbarVisible = value;
+
+ // if (!IsLayoutRequested)
+ // RequestLayout();
+ // }
+ // }
+
+ // void IManageFragments.SetFragmentManager(FragmentManager childFragmentManager)
+ // {
+ // if (_fragmentManager == null)
+ // _fragmentManager = childFragmentManager;
+ // }
+
+ // protected override void Dispose(bool disposing)
+ // {
+ // if (_disposed)
+ // return;
+
+ // _disposed = true;
+
+ // if (disposing)
+ // {
+ // Device.Info.PropertyChanged -= DeviceInfoPropertyChanged;
+
+ // if (NavigationPageController != null)
+ // {
+ // var navController = NavigationPageController;
+
+ // navController.PushRequested -= OnPushed;
+ // navController.PopRequested -= OnPopped;
+ // navController.PopToRootRequested -= OnPoppedToRoot;
+ // navController.InsertPageBeforeRequested -= OnInsertPageBeforeRequested;
+ // navController.RemovePageRequested -= OnRemovePageRequested;
+ // }
+
+ // if (Current != null)
+ // {
+ // Current.PropertyChanged -= CurrentOnPropertyChanged;
+ // }
+
+ // FragmentManager fm = FragmentManager;
+
+ // if (!fm.IsDestroyed)
+ // {
+ // FragmentTransaction trans = fm.BeginTransactionEx();
+ // foreach (Fragment fragment in _fragmentStack)
+ // trans.RemoveEx(fragment);
+ // trans.CommitAllowingStateLossEx();
+ // fm.ExecutePendingTransactionsEx();
+ // }
+
+ // _toolbar.RemoveView(_titleView);
+ // _titleView?.Dispose();
+ // _titleView = null;
+
+ // if (_titleViewRenderer != null)
+ // {
+ // Platform.ClearRenderer(_titleViewRenderer.View);
+ // _titleViewRenderer.Dispose();
+ // _titleViewRenderer = null;
+ // }
+
+ // _toolbar.RemoveView(_titleIconView);
+ // _titleIconView?.Dispose();
+ // _titleIconView = null;
+
+ // _imageSource = null;
+
+ // if (_toolbarTracker != null)
+ // {
+ // _toolbarTracker.CollectionChanged -= ToolbarTrackerOnCollectionChanged;
+
+ // _toolbar.DisposeMenuItems(_currentToolbarItems, OnToolbarItemPropertyChanged);
+
+ // _toolbarTracker.Target = null;
+ // _toolbarTracker = null;
+ // }
+
+ // if (_currentMenuItems != null)
+ // {
+ // _currentMenuItems.Clear();
+ // _currentMenuItems = null;
+ // }
+
+ // if (_currentToolbarItems != null)
+ // {
+ // _currentToolbarItems.Clear();
+ // _currentToolbarItems = null;
+ // }
+
+ // if (_toolbar != null)
+ // {
+ // _toolbar.SetNavigationOnClickListener(null);
+ // _toolbar.Menu.Clear();
+
+ // RemoveView(_toolbar);
+
+ // _toolbar.Dispose();
+ // _toolbar = null;
+ // }
+
+ // if (_drawerLayout.IsAlive() && _drawerListener.IsAlive())
+ // {
+ // _drawerLayout.RemoveDrawerListener(_drawerListener);
+
+ // RemoveView(_drawerLayout);
+ // }
+
+ // if (_drawerListener != null)
+ // {
+ // _drawerListener.Dispose();
+ // _drawerListener = null;
+ // }
+
+ // if (_drawerToggle != null)
+ // {
+ // _drawerToggle.ToolbarNavigationClickListener = null;
+ // _drawerToggle.Dispose();
+ // _drawerToggle = null;
+ // }
+
+ // if (_backgroundDrawable != null)
+ // {
+ // _backgroundDrawable.Dispose();
+ // _backgroundDrawable = null;
+ // }
+
+ // Current = null;
+
+ // // We dispose the child renderers after cleaning up everything related to DrawerLayout in case
+ // // one of the children is a FlyoutPage (which may dispose of the DrawerLayout).
+ // if (VirtualView != null)
+ // {
+ // foreach (VirtualView element in PageController.InternalChildren)
+ // {
+ // var child = element as VisualElement;
+ // if (child == null)
+ // continue;
+
+ // IVisualElementRenderer renderer = Platform.GetRenderer(child);
+ // renderer?.Dispose();
+ // }
+ // }
+ // }
+
+ // base.Dispose(disposing);
+ // }
+
+ // protected override void OnAttachedToWindow()
+ // {
+ // base.OnAttachedToWindow();
+
+ // PageController.SendAppearing();
+
+ // // If the Appearing handler changed the application's main page for some reason,
+ // // this page may no longer be part of the hierarchy; if so, we need to skip
+ // // updating the toolbar and pushing the pages to avoid crashing the app
+ // if (!VirtualView.IsAttachedToRoot())
+ // return;
+
+ // RegisterToolbar();
+
+ // // If there is already stuff on the stack we need to push it
+ // PushCurrentPages();
+
+ // UpdateToolbar();
+ // _isAttachedToWindow = true;
+ // }
+
+ // protected override void OnDetachedFromWindow()
+ // {
+ // base.OnDetachedFromWindow();
+ // PageController.SendDisappearing();
+ // _isAttachedToWindow = false;
+ // }
+
+ // protected override void OnElementChanged(ElementChangedEventArgs e)
+ // {
+ // base.OnElementChanged(e);
+
+ // if (e.OldElement != null)
+ // {
+ // var oldNavController = (INavigationPageController)e.OldElement;
+
+ // oldNavController.PushRequested -= OnPushed;
+ // oldNavController.PopRequested -= OnPopped;
+ // oldNavController.PopToRootRequested -= OnPoppedToRoot;
+ // oldNavController.InsertPageBeforeRequested -= OnInsertPageBeforeRequested;
+ // oldNavController.RemovePageRequested -= OnRemovePageRequested;
+
+ // RemoveAllViews();
+ // }
+
+ // if (e.NewElement != null)
+ // {
+ // if (_toolbarTracker == null)
+ // {
+ // SetupToolbar();
+ // _toolbarTracker = new ToolbarTracker();
+ // _toolbarTracker.CollectionChanged += ToolbarTrackerOnCollectionChanged;
+ // }
+
+ // var parents = new List();
+ // Page root = VirtualView;
+ // while (!Application.IsApplicationOrNull(root.RealParent))
+ // {
+ // root = (Page)root.RealParent;
+ // parents.Add(root);
+ // }
+
+ // _toolbarTracker.Target = e.NewElement;
+ // _toolbarTracker.AdditionalTargets = parents;
+ // UpdateMenu();
+
+
+ // }
+ // }
+
+ // protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
+ // {
+ // base.OnElementPropertyChanged(sender, e);
+
+ // if (e.PropertyName == NavigationPage.BarBackgroundColorProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == NavigationPage.BarBackgroundProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == NavigationPage.BarTextColorProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == BarHeightProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == AutomationProperties.NameProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == AutomationProperties.HelpTextProperty.PropertyName)
+ // UpdateToolbar();
+ // }
+
+ // protected override void OnLayout(bool changed, int l, int t, int r, int b)
+ // {
+ // AToolbar bar = _toolbar;
+ // // make sure bar stays on top of everything
+ // bar.BringToFront();
+
+ // int barHeight = ActionBarHeight();
+
+ // if (VirtualView.IsSet(BarHeightProperty))
+ // barHeight = VirtualView.OnThisPlatform().GetBarHeight();
+
+ // if (barHeight != _lastActionBarHeight && _lastActionBarHeight > 0)
+ // {
+ // ResetToolbar();
+ // bar = _toolbar;
+ // }
+ // _lastActionBarHeight = barHeight;
+
+ // bar.Measure(MeasureSpecFactory.MakeMeasureSpec(r - l, MeasureSpecMode.Exactly), MeasureSpecFactory.MakeMeasureSpec(barHeight, MeasureSpecMode.Exactly));
+
+ // var barOffset = ToolbarVisible ? barHeight : 0;
+ // int containerHeight = b - t - ContainerTopPadding - barOffset - ContainerBottomPadding;
+
+ // PageController.ContainerArea = new Rectangle(0, 0, Context.FromPixels(r - l), Context.FromPixels(containerHeight));
+
+ // // Potential for optimization here, the exact conditions by which you don't need to do this are complex
+ // // and the cost of doing when it's not needed is moderate to low since the layout will short circuit pretty fast
+ // VirtualView.ForceLayout();
+
+ // base.OnLayout(changed, l, t, r, b);
+
+ // bool toolbarLayoutCompleted = false;
+ // for (var i = 0; i < ChildCount; i++)
+ // {
+ // AView child = GetChildAt(i);
+
+ // Page childPage = (child as PageContainer)?.Child?.VirtualView as Page;
+
+ // if (childPage == null)
+ // return;
+
+ // // We need to base the layout of both the child and the bar on the presence of the NavBar on the child Page itself.
+ // // If we layout the bar based on ToolbarVisible, we get a white bar flashing at the top of the screen.
+ // // If we layout the child based on ToolbarVisible, we get a white bar flashing at the bottom of the screen.
+ // bool childHasNavBar = NavigationPage.GetHasNavigationBar(childPage);
+
+ // if (childHasNavBar)
+ // {
+ // bar.Layout(0, 0, r - l, barHeight);
+ // child.Layout(0, barHeight + ContainerTopPadding, r, b - ContainerBottomPadding);
+ // }
+ // else
+ // {
+ // bar.Layout(0, -1000, r, barHeight - 1000);
+ // child.Layout(0, ContainerTopPadding, r, b - ContainerBottomPadding);
+ // }
+ // toolbarLayoutCompleted = true;
+ // }
+
+ // // Making the layout of the toolbar dependant on having a child Page could potentially mean that the toolbar is not laid out.
+ // // We'll do one more check to make sure it isn't missed.
+ // if (!toolbarLayoutCompleted)
+ // {
+ // if (ToolbarVisible)
+ // {
+ // bar.Layout(0, 0, r - l, barHeight);
+ // }
+ // else
+ // {
+ // bar.Layout(0, -1000, r, barHeight - 1000);
+ // }
+ // }
+ // }
+
+ // protected virtual void SetupPageTransition(FragmentTransaction transaction, bool isPush)
+ // {
+ // if (isPush)
+ // transaction.SetTransitionEx((int)FragmentTransit.FragmentOpen);
+ // else
+ // transaction.SetTransitionEx((int)FragmentTransit.FragmentClose);
+ // }
+
+ // internal int GetNavBarHeight()
+ // {
+ // if (!ToolbarVisible)
+ // return 0;
+
+ // return ActionBarHeight();
+ // }
+
+ // int ActionBarHeight()
+ // {
+ // int attr = Microsoft.Maui.Controls.Compatibility.Resource.Attribute.actionBarSize;
+
+ // int actionBarHeight;
+ // using (var tv = new TypedValue())
+ // {
+ // actionBarHeight = 0;
+ // if (Context.Theme.ResolveAttribute(attr, tv, true))
+ // actionBarHeight = TypedValue.ComplexToDimensionPixelSize(tv.Data, Resources.DisplayMetrics);
+ // }
+
+ // if (actionBarHeight <= 0)
+ // return Device.Info.CurrentOrientation.IsPortrait() ? (int)Context.ToPixels(56) : (int)Context.ToPixels(48);
+
+ // if (Context.GetActivity().Window.Attributes.Flags.HasFlag(WindowManagerFlags.TranslucentStatus) || Context.GetActivity().Window.Attributes.Flags.HasFlag(WindowManagerFlags.TranslucentNavigation))
+ // {
+ // if (_toolbar.PaddingTop == 0)
+ // _toolbar.SetPadding(0, GetStatusBarHeight(), 0, 0);
+
+ // return actionBarHeight + GetStatusBarHeight();
+ // }
+
+ // return actionBarHeight;
+ // }
+
+ // void AnimateArrowIn()
+ // {
+ // var icon = _toolbar.NavigationIcon as DrawerArrowDrawable;
+ // if (icon == null)
+ // return;
+
+ // ValueAnimator valueAnim = ValueAnimator.OfFloat(0, 1);
+ // valueAnim.SetDuration(200);
+ // valueAnim.Update += (s, a) => icon.Progress = (float)a.Animation.AnimatedValue;
+ // valueAnim.Start();
+ // }
+
+ // int GetStatusBarHeight()
+ // {
+ // if (_statusbarHeight > 0)
+ // return _statusbarHeight;
+
+ // int resourceId = Resources.GetIdentifier("status_bar_height", "dimen", "android");
+ // if (resourceId > 0)
+ // _statusbarHeight = Resources.GetDimensionPixelSize(resourceId);
+
+ // return _statusbarHeight;
+ // }
+
+ // void AnimateArrowOut()
+ // {
+ // var icon = _toolbar.NavigationIcon as DrawerArrowDrawable;
+ // if (icon == null)
+ // return;
+
+ // ValueAnimator valueAnim = ValueAnimator.OfFloat(1, 0);
+ // valueAnim.SetDuration(200);
+ // valueAnim.Update += (s, a) => icon.Progress = (float)a.Animation.AnimatedValue;
+ // valueAnim.Start();
+ // }
+
+ // public void OnClick(AView v)
+ // {
+ // VirtualView?.PopAsync();
+ // }
+
+ // void CurrentOnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ // {
+ // if (e.PropertyName == NavigationPage.HasNavigationBarProperty.PropertyName)
+ // ToolbarVisible = NavigationPage.GetHasNavigationBar(Current);
+ // else if (e.PropertyName == Page.TitleProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == NavigationPage.HasBackButtonProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == NavigationPage.TitleIconImageSourceProperty.PropertyName ||
+ // e.PropertyName == NavigationPage.TitleViewProperty.PropertyName)
+ // UpdateToolbar();
+ // else if (e.PropertyName == NavigationPage.IconColorProperty.PropertyName)
+ // UpdateToolbar();
+ // }
+
+ //#pragma warning disable 1998 // considered for removal
+ // async void DeviceInfoPropertyChanged(object sender, PropertyChangedEventArgs e)
+ //#pragma warning restore 1998
+ // {
+ // if (nameof(Device.Info.CurrentOrientation) == e.PropertyName)
+ // ResetToolbar();
+ // }
+ // void RegisterToolbar()
+ // {
+ // Context context = Context;
+ // AToolbar bar = _toolbar;
+ // VirtualView page = VirtualView.RealParent;
+
+ // _flyoutPage = null;
+ // while (page != null)
+ // {
+ // if (page is FlyoutPage)
+ // {
+ // _flyoutPage = page as FlyoutPage;
+ // break;
+ // }
+ // page = page.RealParent;
+ // }
+
+ // if (_flyoutPage == null)
+ // {
+ // if (PageController.InternalChildren.Count > 0)
+ // _flyoutPage = PageController.InternalChildren[0] as FlyoutPage;
+
+ // if (_flyoutPage == null)
+ // return;
+ // }
+
+ // if (((IFlyoutPageController)_flyoutPage).ShouldShowSplitMode)
+ // return;
+
+ // var renderer = APlatform.GetRenderer(_flyoutPage) as FlyoutPageRenderer;
+ // if (renderer == null)
+ // return;
+
+ // _drawerLayout = renderer;
+
+ // FastRenderers.AutomationPropertiesProvider.GetDrawerAccessibilityResources(context, _flyoutPage, out int resourceIdOpen, out int resourceIdClose);
+
+ // if (_drawerToggle != null)
+ // {
+ // _drawerToggle.ToolbarNavigationClickListener = null;
+ // _drawerToggle.Dispose();
+ // }
+
+ // _drawerToggle = new ActionBarDrawerToggle(context.GetActivity(), _drawerLayout, bar,
+ // resourceIdOpen == 0 ? global::Android.Resource.String.Ok : resourceIdOpen,
+ // resourceIdClose == 0 ? global::Android.Resource.String.Ok : resourceIdClose)
+ // {
+ // ToolbarNavigationClickListener = new ClickListener(VirtualView)
+ // };
+
+ // if (_drawerListener != null)
+ // {
+ // _drawerLayout.RemoveDrawerListener(_drawerListener);
+ // _drawerListener.Dispose();
+ // }
+
+ // _drawerListener = new DrawerMultiplexedListener { Listeners = { _drawerToggle, renderer } };
+ // _drawerLayout.AddDrawerListener(_drawerListener);
+ // }
+
+
+
+ // void ResetToolbar()
+ // {
+ // AToolbar oldToolbar = _toolbar;
+
+ // _toolbar.SetNavigationOnClickListener(null);
+ // _toolbar.RemoveFromParent();
+
+ // _toolbar.RemoveView(_titleView);
+ // _titleView = null;
+
+ // if (_titleViewRenderer != null)
+ // {
+ // Platform.ClearRenderer(_titleViewRenderer.View);
+ // _titleViewRenderer.Dispose();
+ // _titleViewRenderer = null;
+ // }
+
+ // _toolbar.RemoveView(_titleIconView);
+ // _titleIconView = null;
+
+ // _imageSource = null;
+
+ // _toolbar = null;
+
+ // SetupToolbar();
+
+ // // if the old toolbar had padding from transluscentflags, set it to the new toolbar
+ // if (oldToolbar.PaddingTop != 0)
+ // _toolbar.SetPadding(0, oldToolbar.PaddingTop, 0, 0);
+
+ // RegisterToolbar();
+ // UpdateToolbar();
+ // UpdateMenu();
+
+ // // Preserve old values that can't be replicated by calling methods above
+ // if (_toolbar != null)
+ // _toolbar.Subtitle = oldToolbar.Subtitle;
+ // }
+
+ // void SetupToolbar()
+ // {
+ // Context context = Context;
+ // var activity = context.GetActivity();
+
+ // AToolbar bar;
+ // if (FormsAppCompatActivity.ToolbarResource != 0)
+ // bar = activity.LayoutInflater.Inflate(FormsAppCompatActivity.ToolbarResource, null).JavaCast();
+ // else
+ // bar = new AToolbar(context);
+
+ // bar.SetNavigationOnClickListener(this);
+
+ // AddView(bar);
+ // _toolbar = bar;
+ // }
+
+
+
+ // Fragment GetFragment(Page page, bool removed, bool popToRoot)
+ // {
+ // // pop
+ // if (removed)
+ // return _fragmentStack[_fragmentStack.Count - 2];
+
+ // // pop to root
+ // if (popToRoot)
+ // return _fragmentStack[0];
+
+ // // push
+ // return FragmentContainer.CreateInstance(page);
+ // }
+
+ // void ToolbarTrackerOnCollectionChanged(object sender, EventArgs eventArgs)
+ // {
+ // UpdateMenu();
+ // }
+
+ // void UpdateMenu()
+ // {
+ // if (_disposed || _currentMenuItems == null)
+ // return;
+
+ // _currentMenuItems.Clear();
+ // _currentMenuItems = new List();
+ // _toolbar.UpdateMenuItems(_toolbarTracker?.ToolbarItems, Context, null, OnToolbarItemPropertyChanged, _currentMenuItems, _currentToolbarItems, UpdateMenuItemIcon);
+ // }
+
+ // protected virtual void OnToolbarItemPropertyChanged(object sender, PropertyChangedEventArgs e)
+ // {
+ // var items = _toolbarTracker?.ToolbarItems?.ToList();
+ // _toolbar.OnToolbarItemPropertyChanged(e, (ToolbarItem)sender, items, Context, null, OnToolbarItemPropertyChanged, _currentMenuItems, _currentToolbarItems, UpdateMenuItemIcon);
+ // }
+
+ // protected virtual void UpdateMenuItemIcon(Context context, IMenuItem menuItem, ToolbarItem toolBarItem)
+ // {
+ // ToolbarExtensions.UpdateMenuItemIcon(context, menuItem, toolBarItem, null);
+ // }
+
+ // void UpdateToolbar()
+ // {
+ // if (_disposed)
+ // return;
+
+ // Context context = Context;
+ // AToolbar bar = _toolbar;
+ // ActionBarDrawerToggle toggle = _drawerToggle;
+
+ // if (bar == null)
+ // return;
+
+ // bool isNavigated = NavigationPageController.StackDepth > 1;
+ // bar.NavigationIcon = null;
+ // Page currentPage = VirtualView.CurrentPage;
+
+ // if (isNavigated)
+ // {
+ // if (NavigationPage.GetHasBackButton(currentPage) && !Context.IsDesignerContext())
+ // {
+ // if (toggle != null)
+ // {
+ // toggle.DrawerIndicatorEnabled = false;
+ // toggle.SyncState();
+ // }
+
+ // var activity = (AppCompatActivity)context.GetActivity();
+ // var icon = new DrawerArrowDrawable(activity.SupportActionBar.ThemedContext);
+ // icon.Progress = 1;
+ // bar.NavigationIcon = icon;
+
+ // var prevPage = VirtualView.Peek(1);
+ // var backButtonTitle = NavigationPage.GetBackButtonTitle(prevPage);
+ // _defaultNavigationContentDescription = backButtonTitle != null
+ // ? bar.SetNavigationContentDescription(prevPage, backButtonTitle)
+ // : bar.SetNavigationContentDescription(prevPage, _defaultNavigationContentDescription);
+ // }
+ // else if (toggle != null && _flyoutPage != null)
+ // {
+ // toggle.DrawerIndicatorEnabled = _flyoutPage.ShouldShowToolbarButton();
+ // toggle.SyncState();
+ // }
+ // }
+ // else
+ // {
+ // if (toggle != null && _flyoutPage != null)
+ // {
+ // toggle.DrawerIndicatorEnabled = _flyoutPage.ShouldShowToolbarButton();
+ // toggle.SyncState();
+ // }
+ // }
+
+ // Color tintColor = VirtualView.BarBackgroundColor;
+
+ // if (Forms.IsLollipopOrNewer)
+ // {
+ // if (tintColor == null)
+ // bar.BackgroundTintMode = null;
+ // else
+ // {
+ // bar.BackgroundTintMode = PorterDuff.Mode.Src;
+ // bar.BackgroundTintList = ColorStateList.ValueOf(tintColor.ToAndroid());
+ // }
+ // }
+ // else
+ // {
+ // if (tintColor == null && _backgroundDrawable != null)
+ // bar.SetBackground(_backgroundDrawable);
+ // else if (tintColor != null)
+ // {
+ // if (_backgroundDrawable == null)
+ // _backgroundDrawable = bar.Background;
+ // bar.SetBackgroundColor(tintColor.ToAndroid());
+ // }
+ // }
+
+ // Brush barBackground = VirtualView.BarBackground;
+ // bar.UpdateBackground(barBackground);
+
+ // Color textColor = VirtualView.BarTextColor;
+ // if (textColor != null)
+ // bar.SetTitleTextColor(textColor.ToAndroid().ToArgb());
+
+ // Color navIconColor = NavigationPage.GetIconColor(Current);
+ // if (navIconColor != null && bar.NavigationIcon != null)
+ // DrawableExtensions.SetColorFilter(bar.NavigationIcon, navIconColor, FilterMode.SrcAtop);
+
+ // bar.Title = currentPage?.Title ?? string.Empty;
+
+ // if (_toolbar.NavigationIcon != null && textColor != null)
+ // {
+ // var icon = _toolbar.NavigationIcon as DrawerArrowDrawable;
+ // if (icon != null)
+ // icon.Color = textColor.ToAndroid().ToArgb();
+ // }
+
+ // UpdateTitleIcon();
+
+ // UpdateTitleView();
+ // }
+
+ // void UpdateTitleIcon()
+ // {
+ // Page currentPage = VirtualView.CurrentPage;
+
+ // if (currentPage == null)
+ // return;
+
+ // ImageSource source = NavigationPage.GetTitleIconImageSource(currentPage);
+
+ // if (source == null || source.IsEmpty)
+ // {
+ // _toolbar.RemoveView(_titleIconView);
+ // _titleIconView?.Dispose();
+ // _titleIconView = null;
+ // _imageSource = null;
+ // return;
+ // }
+
+ // if (_titleIconView == null)
+ // {
+ // _titleIconView = new ImageView(Context);
+ // _toolbar.AddView(_titleIconView, 0);
+ // }
+
+ // if (_imageSource != source)
+ // {
+ // _imageSource = source;
+ // _titleIconView.SetImageResource(global::Android.Resource.Color.Transparent);
+ // _ = this.ApplyDrawableAsync(currentPage, NavigationPage.TitleIconImageSourceProperty, Context, drawable =>
+ // {
+ // _titleIconView.SetImageDrawable(drawable);
+ // FastRenderers.AutomationPropertiesProvider.AccessibilitySettingsChanged(_titleIconView, source);
+ // });
+ // }
+ // }
+
+ // void UpdateTitleView()
+ // {
+ // AToolbar bar = _toolbar;
+
+ // if (bar == null)
+ // return;
+
+ // Page currentPage = VirtualView.CurrentPage;
+
+ // if (currentPage == null)
+ // return;
+
+ // VisualElement titleView = NavigationPage.GetTitleView(currentPage);
+ // if (_titleViewRenderer != null)
+ // {
+ // var reflectableType = _titleViewRenderer as System.Reflection.IReflectableType;
+ // var rendererType = reflectableType != null ? reflectableType.GetTypeInfo().AsType() : _titleViewRenderer.GetType();
+ // if (titleView == null || Internals.Registrar.Registered.GetHandlerTypeForObject(titleView) != rendererType)
+ // {
+ // if (_titleView != null)
+ // _titleView.Child = null;
+ // Platform.ClearRenderer(_titleViewRenderer.View);
+ // _titleViewRenderer.Dispose();
+ // _titleViewRenderer = null;
+ // }
+ // }
+
+ // if (titleView == null)
+ // return;
+
+ // if (_titleViewRenderer != null)
+ // _titleViewRenderer.SetElement(titleView);
+ // else
+ // {
+ // _titleViewRenderer = Platform.CreateRenderer(titleView, Context);
+
+ // if (_titleView == null)
+ // {
+ // _titleView = new Container(Context);
+ // bar.AddView(_titleView);
+ // }
+
+ // _titleView.Child = _titleViewRenderer;
+ // }
+
+ // Platform.SetRenderer(titleView, _titleViewRenderer);
+ // }
+
+ // void AddTransitionTimer(TaskCompletionSource tcs, Fragment fragment, FragmentManager fragmentManager, IReadOnlyCollection fragmentsToRemove, int duration, bool shouldUpdateToolbar)
+ // {
+ // Device.StartTimer(TimeSpan.FromMilliseconds(duration), () =>
+ // {
+ // tcs.TrySetResult(true);
+ // Current?.SendAppearing();
+ // if (shouldUpdateToolbar)
+ // UpdateToolbar();
+
+ // if (fragmentsToRemove.Count > 0)
+ // {
+ // FragmentTransaction fragmentTransaction = fragmentManager.BeginTransactionEx();
+
+ // foreach (Fragment frag in fragmentsToRemove)
+ // fragmentTransaction.RemoveEx(frag);
+
+ // fragmentTransaction.CommitAllowingStateLossEx();
+ // }
+
+ // return false;
+ // });
+ // }
+
+ // void PushCurrentPages()
+ // {
+ // if (_fragmentStack.Count > 0)
+ // return;
+
+ // foreach (Page page in NavigationPageController.Pages)
+ // {
+ // PushViewAsync(page, false);
+ // }
+ // }
+
+ // class ClickListener : Object, IOnClickListener
+ // {
+ // readonly NavigationPage _element;
+
+ // public ClickListener(NavigationPage element)
+ // {
+ // _element = element;
+ // }
+
+ // public void OnClick(AView v)
+ // {
+ // _element?.PopAsync();
+ // }
+ // }
+
+ // internal class Container : ViewGroup
+ // {
+ // IVisualElementRenderer _child;
+
+ // public Container(IntPtr p, global::Android.Runtime.JniHandleOwnership o) : base(p, o)
+ // {
+ // // Added default constructor to prevent crash in Dispose
+ // }
+
+ // public Container(Context context) : base(context)
+ // {
+ // }
+
+ // public IVisualElementRenderer Child
+ // {
+ // set
+ // {
+ // if (_child != null)
+ // RemoveView(_child.View);
+
+ // _child = value;
+
+ // if (value != null)
+ // AddView(value.View);
+ // }
+ // }
+
+ // protected override void OnLayout(bool changed, int l, int t, int r, int b)
+ // {
+ // if (_child == null)
+ // return;
+
+ // _child.UpdateLayout();
+ // }
+
+ // protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
+ // {
+ // if (_child == null)
+ // {
+ // SetMeasuredDimension(0, 0);
+ // return;
+ // }
+
+ // VisualElement element = _child.VirtualView;
+
+ // Context ctx = Context;
+
+ // var width = (int)ctx.FromPixels(MeasureSpecFactory.GetSize(widthMeasureSpec));
+
+ // SizeRequest request = _child.VirtualView.Measure(width, double.PositiveInfinity, MeasureFlags.IncludeMargins);
+ // Microsoft.Maui.Controls.Layout.LayoutChildIntoBoundingRegion(_child.VirtualView, new Rectangle(0, 0, width, request.Request.Height));
+
+ // int widthSpec = MeasureSpecFactory.MakeMeasureSpec((int)ctx.ToPixels(width), MeasureSpecMode.Exactly);
+ // int heightSpec = MeasureSpecFactory.MakeMeasureSpec((int)ctx.ToPixels(request.Request.Height), MeasureSpecMode.Exactly);
+
+ // _child.View.Measure(widthMeasureSpec, heightMeasureSpec);
+ // SetMeasuredDimension(widthSpec, heightSpec);
+ // }
+ // }
+
+ // class DrawerMultiplexedListener : Object, DrawerLayout.IDrawerListener
+ // {
+ // public List Listeners { get; } = new List(2);
+
+ // public void OnDrawerClosed(AView drawerView)
+ // {
+ // foreach (DrawerLayout.IDrawerListener listener in Listeners)
+ // listener.OnDrawerClosed(drawerView);
+ // }
+
+ // public void OnDrawerOpened(AView drawerView)
+ // {
+ // foreach (DrawerLayout.IDrawerListener listener in Listeners)
+ // listener.OnDrawerOpened(drawerView);
+ // }
+
+ // public void OnDrawerSlide(AView drawerView, float slideOffset)
+ // {
+ // foreach (DrawerLayout.IDrawerListener listener in Listeners)
+ // listener.OnDrawerSlide(drawerView, slideOffset);
+ // }
+
+ // public void OnDrawerStateChanged(int newState)
+ // {
+ // foreach (DrawerLayout.IDrawerListener listener in Listeners)
+ // listener.OnDrawerStateChanged(newState);
+ // }
+ // }
+ }
+}
diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Standard.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Standard.cs
new file mode 100644
index 000000000000..8284a371df21
--- /dev/null
+++ b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Standard.cs
@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Maui.Handlers;
+
+namespace Microsoft.Maui.Controls.Handlers
+{
+ public partial class NavigationPageHandler :
+ ViewHandler
+ {
+ protected override object CreateNativeView()
+ {
+ throw new NotImplementedException();
+ }
+
+ public static void MapPadding(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapTitleColor(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapNavigationBarBackground(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapTitleIcon(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapTitleView(NavigationPageHandler handler, NavigationPage view) { }
+ }
+}
diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Windows.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Windows.cs
new file mode 100644
index 000000000000..6a06344a39e9
--- /dev/null
+++ b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.Windows.cs
@@ -0,0 +1,702 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Threading.Tasks;
+using Windows.Devices.Input;
+using Windows.UI.Input;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media.Animation;
+using Windows.UI.Core;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.Maui.Controls.Internals;
+using static Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.Page;
+using WBrush = Microsoft.UI.Xaml.Media.Brush;
+using WImageSource = Microsoft.UI.Xaml.Media.ImageSource;
+using Microsoft.Maui.Graphics;
+using Microsoft.Maui.Handlers;
+using Microsoft.Maui.Controls.Platform;
+
+namespace Microsoft.Maui.Controls.Handlers
+{
+ public partial class NavigationPageHandler :
+ ViewHandler, ITitleProvider, ITitleIconProvider,
+ ITitleViewProvider, IToolbarProvider, IToolBarForegroundBinder, IViewHandler
+ {
+ Page _currentPage;
+ Page _previousPage;
+
+ FlyoutPage _parentFlyoutPage;
+ TabbedPage _parentTabbedPage;
+ bool _showTitle = true;
+ VisualElementTracker _tracker;
+ EntranceThemeTransition _transition;
+ bool _parentsLookedUp = false;
+
+ public void BindForegroundColor(AppBar appBar)
+ {
+ SetAppBarForegroundBinding(appBar);
+ }
+
+ public void BindForegroundColor(AppBarButton button)
+ {
+ SetAppBarForegroundBinding(button);
+ }
+
+ protected VisualElementTracker Tracker
+ {
+ get { return _tracker; }
+ set
+ {
+ if (_tracker == value)
+ return;
+
+ if (_tracker != null)
+ _tracker.Dispose();
+
+ _tracker = value;
+ }
+ }
+
+ //public void Dispose()
+ //{
+ // Dispose(true);
+ //}
+
+ void SetAppBarForegroundBinding(FrameworkElement element)
+ {
+ element.SetBinding(Control.ForegroundProperty,
+ new Microsoft.UI.Xaml.Data.Binding { Path = new PropertyPath("TitleBrush"), Source = NativeView, RelativeSource = new RelativeSource { Mode = RelativeSourceMode.TemplatedParent } });
+ }
+
+ WBrush ITitleProvider.BarBackgroundBrush
+ {
+ set
+ {
+ NativeView.ToolbarBackground = value;
+ UpdateTitleOnParents();
+ }
+ }
+
+ WBrush ITitleProvider.BarForegroundBrush
+ {
+ set
+ {
+ NativeView.TitleBrush = value;
+ UpdateTitleOnParents();
+ }
+ }
+
+ bool ITitleProvider.ShowTitle
+ {
+ get { return _showTitle; }
+ set
+ {
+ if (_showTitle == value)
+ return;
+
+ _showTitle = value;
+ UpdateTitleVisible();
+ UpdateTitleOnParents();
+ }
+ }
+
+ public string Title
+ {
+ get { return _currentPage?.Title; }
+
+ set { /*Not implemented but required by interface*/ }
+ }
+
+ public WImageSource TitleIcon { get; set; }
+
+ public View TitleView
+ {
+ get
+ {
+ if (_currentPage == null)
+ return null;
+
+ return NavigationPage.GetTitleView(_currentPage) as View;
+ }
+ set { /*Not implemented but required by interface*/ }
+ }
+
+ Task IToolbarProvider.GetCommandBarAsync()
+ {
+ return ((IToolbarProvider)NativeView)?.GetCommandBarAsync();
+ }
+
+ public FrameworkElement ContainerElement
+ {
+ get { return NativeView; }
+ }
+
+ IView IViewHandler.VirtualView
+ {
+ get { return VirtualView; }
+ }
+
+ public event EventHandler ElementChanged;
+
+ public override Size GetDesiredSize(double widthConstraint, double heightConstraint)
+ {
+ var constraint = new Windows.Foundation.Size(widthConstraint, heightConstraint);
+ IViewHandler childRenderer = VirtualView.CurrentPage.Handler;
+ FrameworkElement child = childRenderer.NativeView as FrameworkElement;
+
+ double oldWidth = child.Width;
+ double oldHeight = child.Height;
+
+ child.Height = double.NaN;
+ child.Width = double.NaN;
+
+ child.Measure(constraint);
+ var result = new Size(Math.Ceiling(child.DesiredSize.Width), Math.Ceiling(child.DesiredSize.Height));
+
+ child.Width = oldWidth;
+ child.Height = oldHeight;
+
+ return result;
+ }
+
+ object IViewHandler.NativeView
+ {
+ get
+ {
+ return NativeView;
+ }
+ }
+
+ protected override PageControl CreateNativeView()
+ {
+ return new PageControl();
+ }
+
+ public override void SetVirtualView(IView view)
+ {
+ base.SetVirtualView(view);
+
+ if (view != null && !(view is NavigationPage))
+ throw new ArgumentException("VirtualView must be a Page", nameof(view));
+
+ if (view is NavigationPage np && np != null && np.CurrentPage is null)
+ throw new InvalidOperationException(
+ "NavigationPage must have a root Page before being used. Either call PushAsync with a valid Page, or pass a Page to the constructor before usage.");
+
+ }
+
+ protected override void ConnectHandler(PageControl nativeView)
+ {
+ base.ConnectHandler(nativeView);
+
+ NativeView.PointerPressed += OnPointerPressed;
+ NativeView.SizeChanged += OnNativeSizeChanged;
+ Tracker = new BackgroundTracker(Control.BackgroundProperty)
+ {
+ Element = VirtualView,
+ Container = NativeView
+ };
+
+ SetPage(VirtualView.CurrentPage, false, false);
+
+ NativeView.Loaded += OnLoaded;
+ NativeView.Unloaded += OnUnloaded;
+
+ NativeView.DataContext = VirtualView.CurrentPage;
+
+ // Move this somewhere else
+ LookupRelevantParents();
+
+ // Enforce consistency rules on toolbar (show toolbar if top-level page is Navigation Page)
+ NativeView.ShouldShowToolbar = _parentFlyoutPage == null && _parentTabbedPage == null;
+ if (_parentTabbedPage != null)
+ VirtualView.Appearing += OnElementAppearing;
+
+ VirtualView.PushRequested += OnPushRequested;
+ VirtualView.PopRequested += OnPopRequested;
+ VirtualView.PopToRootRequested += OnPopToRootRequested;
+ VirtualView.InternalChildren.CollectionChanged += OnChildrenChanged;
+
+ if (!string.IsNullOrEmpty(VirtualView.AutomationId))
+ NativeView.SetValue(Microsoft.UI.Xaml.Automation.AutomationProperties.AutomationIdProperty, VirtualView.AutomationId);
+
+ PushExistingNavigationStack();
+ }
+
+ protected override void DisconnectHandler(PageControl nativeView)
+ {
+ base.DisconnectHandler(nativeView);
+
+ if (VirtualView == null)
+ return;
+
+ VirtualView.PushRequested -= OnPushRequested;
+ VirtualView.PopRequested -= OnPopRequested;
+ VirtualView.PopToRootRequested -= OnPopToRootRequested;
+ VirtualView.InternalChildren.CollectionChanged -= OnChildrenChanged;
+ NativeView.PointerPressed -= OnPointerPressed;
+ NativeView.SizeChanged -= OnNativeSizeChanged;
+ NativeView.Loaded -= OnLoaded;
+ NativeView.Unloaded -= OnUnloaded;
+
+ // from Dispose
+ VirtualView?.SendDisappearing();
+
+ NativeView.PointerPressed -= OnPointerPressed;
+ NativeView.SizeChanged -= OnNativeSizeChanged;
+ NativeView.Loaded -= OnLoaded;
+ NativeView.Unloaded -= OnUnloaded;
+
+ if (_parentTabbedPage != null)
+ VirtualView.Appearing -= OnElementAppearing;
+
+ SetPage(null, false, true);
+ _previousPage = null;
+
+ if (_parentTabbedPage != null)
+ _parentTabbedPage.PropertyChanged -= MultiPagePropertyChanged;
+
+ if (_parentFlyoutPage != null)
+ _parentFlyoutPage.PropertyChanged -= MultiPagePropertyChanged;
+ }
+
+ protected virtual void OnElementChanged(VisualElementChangedEventArgs e)
+ {
+ EventHandler changed = ElementChanged;
+ if (changed != null)
+ changed(this, e);
+ }
+
+ WBrush GetBarBackgroundColorBrush()
+ {
+ object defaultColor = GetDefaultColor();
+
+ if (VirtualView.BarBackgroundColor.IsDefault() && defaultColor != null)
+ return (WBrush)defaultColor;
+ return Maui.ColorExtensions.ToNative(VirtualView.BarBackgroundColor);
+ }
+
+ static WBrush GetBarBackgroundBrush(NavigationPage navigationPage)
+ {
+ var barBackground = navigationPage.BarBackground;
+ object defaultColor = GetDefaultColor();
+
+ if (!Brush.IsNullOrEmpty(barBackground))
+ return barBackground.ToBrush();
+
+ if (defaultColor != null)
+ return (WBrush)defaultColor;
+
+ return null;
+ }
+
+ static WBrush GetBarForegroundBrush(NavigationPage navigationPage)
+ {
+ object defaultColor = Microsoft.UI.Xaml.Application.Current.Resources["ApplicationForegroundThemeBrush"];
+ if (navigationPage.BarTextColor.IsDefault())
+ return (WBrush)defaultColor;
+ return Maui.ColorExtensions.ToNative(navigationPage.BarTextColor);
+ }
+
+ bool GetIsNavBarPossible()
+ {
+ return _showTitle;
+ }
+
+ void LookupRelevantParents()
+ {
+ IEnumerable parentPages = VirtualView.GetParentPages();
+
+ if (_parentTabbedPage != null)
+ _parentTabbedPage.PropertyChanged -= MultiPagePropertyChanged;
+ if (_parentFlyoutPage != null)
+ _parentFlyoutPage.PropertyChanged -= MultiPagePropertyChanged;
+
+ foreach (Page parentPage in parentPages)
+ {
+ _parentTabbedPage = parentPage as TabbedPage;
+ _parentFlyoutPage = parentPage as FlyoutPage;
+ }
+
+ if (_parentTabbedPage != null)
+ _parentTabbedPage.PropertyChanged += MultiPagePropertyChanged;
+ if (_parentFlyoutPage != null)
+ _parentFlyoutPage.PropertyChanged += MultiPagePropertyChanged;
+
+ UpdateShowTitle();
+ UpdateTitleOnParents();
+ _parentsLookedUp = true;
+ }
+
+ void MultiPagePropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == "CurrentPage" || e.PropertyName == "Detail")
+ {
+ UpdateTitleOnParents();
+ UpdateTitleIcon();
+ UpdateTitleView();
+ }
+ }
+
+ void OnBackClicked(object sender, RoutedEventArgs e)
+ {
+ VirtualView?.SendBackButtonPressed();
+ }
+
+ void OnChildrenChanged(object sender, NotifyCollectionChangedEventArgs e)
+ {
+ UpdateBackButton();
+ }
+
+ // TODO MAUI: hmmmmmm can we make this not be property changed based?
+ void OnCurrentPagePropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == NavigationPage.HasBackButtonProperty.PropertyName)
+ UpdateBackButton();
+ else if (e.PropertyName == NavigationPage.BackButtonTitleProperty.PropertyName)
+ UpdateBackButtonTitle();
+ else if (e.PropertyName == NavigationPage.HasNavigationBarProperty.PropertyName)
+ UpdateTitleVisible();
+ else if (e.PropertyName == Page.TitleProperty.PropertyName)
+ UpdateTitleOnParents();
+ else if (e.PropertyName == NavigationPage.TitleIconImageSourceProperty.PropertyName)
+ UpdateTitleIcon();
+ else if (e.PropertyName == NavigationPage.TitleViewProperty.PropertyName)
+ UpdateTitleView();
+ }
+
+ void OnElementAppearing(object sender, EventArgs e)
+ {
+ UpdateTitleVisible();
+ UpdateBackButton();
+ }
+
+ void OnLoaded(object sender, RoutedEventArgs args)
+ {
+ if (VirtualView == null)
+ return;
+
+ VirtualView.SendAppearing();
+ UpdateBackButton();
+ UpdateTitleOnParents();
+
+ if (_parentFlyoutPage != null)
+ {
+ UpdateTitleView();
+ UpdateTitleIcon();
+ }
+ }
+
+ void OnNativeSizeChanged(object sender, SizeChangedEventArgs e)
+ {
+ UpdateContainerArea();
+ }
+
+ void OnPointerPressed(object sender, PointerRoutedEventArgs e)
+ {
+ if (e.Handled)
+ return;
+
+ var point = e.GetCurrentPoint(NativeView);
+ if (point == null)
+ return;
+
+ if (point.PointerDeviceType != PointerDeviceType.Mouse)
+ return;
+
+ if (point.Properties.IsXButton1Pressed)
+ {
+ e.Handled = true;
+ OnBackClicked(NativeView, e);
+ }
+ }
+
+ protected virtual void OnPopRequested(object sender, NavigationRequestedEventArgs e)
+ {
+ var newCurrent = VirtualView.Peek(1);
+ SetPage(newCurrent, e.Animated, true);
+ }
+
+ protected virtual void OnPopToRootRequested(object sender, NavigationRequestedEventArgs e)
+ {
+ SetPage(e.Page, e.Animated, true);
+ }
+
+ protected virtual void OnPushRequested(object sender, NavigationRequestedEventArgs e)
+ {
+ SetPage(e.Page, e.Animated, false);
+ }
+
+ void OnUnloaded(object sender, RoutedEventArgs args)
+ {
+ VirtualView?.SendDisappearing();
+ }
+
+ void PushExistingNavigationStack()
+ {
+ foreach (var page in VirtualView.Pages)
+ {
+ SetPage(page, false, false);
+ }
+ }
+
+ void SetPage(Page page, bool isAnimated, bool isPopping)
+ {
+ if (_currentPage != null)
+ {
+ if (isPopping)
+ {
+ _currentPage.Cleanup();
+ NativeView.TitleView?.Cleanup();
+ }
+
+ NativeView.Content = null;
+ _currentPage.PropertyChanged -= OnCurrentPagePropertyChanged;
+ }
+
+ if (!isPopping)
+ _previousPage = _currentPage;
+
+ _currentPage = page;
+
+ if (page == null)
+ return;
+
+ UpdateBackButton();
+ UpdateBackButtonTitle();
+
+ page.PropertyChanged += OnCurrentPagePropertyChanged;
+
+ IViewHandler renderer = page.GetOrCreateHandler(this.MauiContext);
+
+ UpdateTitleVisible();
+ UpdateTitleOnParents();
+ UpdateTitleView();
+
+ SetupPageTransition(_transition, isAnimated, isPopping);
+
+ NativeView.Content = renderer.NativeView;
+ NativeView.DataContext = page;
+ }
+
+ protected virtual void SetupPageTransition(Transition transition, bool isAnimated, bool isPopping)
+ {
+ if (isAnimated && transition == null)
+ {
+ transition = new EntranceThemeTransition();
+ _transition = (EntranceThemeTransition)transition;
+ NativeView.ContentTransitions = new TransitionCollection();
+ }
+
+ if (!isAnimated && NativeView.ContentTransitions?.Count > 0)
+ {
+ NativeView.ContentTransitions.Clear();
+ }
+ else if (isAnimated && NativeView.ContentTransitions.Contains(transition) == false)
+ {
+ NativeView.ContentTransitions.Clear();
+ NativeView.ContentTransitions.Add(transition);
+ }
+ }
+
+ void UpdateBackButtonTitle()
+ {
+ string title = null;
+ if (_previousPage != null)
+ title = NavigationPage.GetBackButtonTitle(_previousPage);
+
+ NativeView.BackButtonTitle = title;
+ }
+
+ void UpdateContainerArea()
+ {
+ VirtualView.ContainerArea = new Rectangle(0, 0, NativeView.ContentWidth, NativeView.ContentHeight);
+ }
+
+ void UpdateTitleVisible()
+ {
+ UpdateTitleOnParents();
+
+ bool showing = NativeView.TitleVisibility == Visibility.Visible;
+ bool newValue = GetIsNavBarPossible() && NavigationPage.GetHasNavigationBar(_currentPage);
+ if (showing == newValue)
+ return;
+
+ NativeView.TitleVisibility = newValue ? Visibility.Visible : Visibility.Collapsed;
+
+ // Force ContentHeight/Width to update, doesn't work from inside PageControl for some reason
+ NativeView.UpdateLayout();
+ UpdateContainerArea();
+ }
+
+ void UpdateShowTitle()
+ {
+ ((ITitleProvider)this).ShowTitle = _parentTabbedPage == null && _parentFlyoutPage == null;
+ }
+
+ static object GetDefaultColor()
+ {
+ return Microsoft.UI.Xaml.Application.Current.Resources["SystemControlBackgroundChromeMediumLowBrush"];
+ }
+
+ void UpdateBackButton()
+ {
+ if (_currentPage == null)
+ {
+ return;
+ }
+
+ bool showBackButton = VirtualView.InternalChildren.Count > 1 && NavigationPage.GetHasBackButton(_currentPage);
+ if (NativeVersion.IsDesktop)
+ {
+ //TODO MAUI: this means it's running as a desktop app
+ }
+ else
+ {
+ var navManager = SystemNavigationManager.GetForCurrentView();
+ if(navManager != null)
+ navManager.AppViewBackButtonVisibility = showBackButton ? AppViewBackButtonVisibility.Visible : AppViewBackButtonVisibility.Collapsed;
+ }
+
+ NativeView.SetBackButtonTitle(VirtualView);
+ }
+
+ void UpdateTitleOnParents()
+ {
+ if (VirtualView == null || _currentPage == null)
+ return;
+
+ ITitleProvider render = null;
+ if (_parentTabbedPage != null)
+ {
+ render = _parentTabbedPage.Handler as ITitleProvider;
+ if (render != null)
+ render.ShowTitle = (_parentTabbedPage.CurrentPage == VirtualView) && NavigationPage.GetHasNavigationBar(_currentPage);
+ }
+
+ if (_parentFlyoutPage != null)
+ {
+ render = _parentFlyoutPage.Handler as ITitleProvider;
+ if (render != null)
+ render.ShowTitle = (_parentFlyoutPage.Detail == VirtualView) && NavigationPage.GetHasNavigationBar(_currentPage);
+ }
+
+ if (render != null && render.ShowTitle)
+ {
+ render.Title = _currentPage.Title;
+
+ if (!Brush.IsNullOrEmpty(VirtualView.BarBackground))
+ render.BarBackgroundBrush = GetBarBackgroundBrush(VirtualView);
+ else
+ render.BarBackgroundBrush = GetBarBackgroundColorBrush();
+
+ render.BarForegroundBrush = GetBarForegroundBrush(VirtualView);
+ }
+
+ if (_showTitle || (render != null && render.ShowTitle))
+ {
+ ToolbarManager.UpdateToolbarItems(VirtualView)
+ .FireAndForget((e)=> Log.Warning(nameof(NavigationPage), $"{e}"));
+ }
+ }
+
+ void UpdatePadding()
+ {
+ NativeView.TitleInset = VirtualView.Padding.Left;
+ }
+
+ void UpdateTitleColor()
+ {
+ (this as ITitleProvider).BarForegroundBrush = GetBarForegroundBrush(VirtualView);
+ }
+
+ void UpdateNavigationBarBackground()
+ {
+ (this as ITitleProvider).BarBackgroundBrush = GetBarBackgroundBrush(VirtualView);
+ }
+
+ void UpdateTitleIcon() =>
+ UpdateTitleIconAsync()
+ .FireAndForget(errorCallback: (e) => Log.Warning(nameof(TitleIcon), $"{e}"));
+
+ async Task UpdateTitleIconAsync()
+ {
+ var page = _currentPage;
+ if (page == null)
+ return;
+
+ ImageSource source = NavigationPage.GetTitleIconImageSource(page);
+
+ TitleIcon = await source.ToWindowsImageSourceAsync();
+
+ if (NativeView == null || _currentPage != page)
+ return;
+
+ NativeView.TitleIcon = TitleIcon;
+
+ if (_parentFlyoutPage != null && this is ITitleIconProvider parent)
+ parent.TitleIcon = TitleIcon;
+
+ NativeView.UpdateLayout();
+ UpdateContainerArea();
+ }
+
+ void UpdateTitleView()
+ {
+ // if the life cycle hasn't reached the point where _parentFlyoutPage gets wired up then
+ // don't update the title view
+ if (_currentPage == null || !_parentsLookedUp)
+ return;
+
+ // If the container TitleView gets initialized before the FP TitleView it causes the
+ // FP TitleView to not render correctly
+ if (_parentFlyoutPage != null)
+ {
+ if (this is ITitleViewProvider parent)
+ parent.TitleView = TitleView;
+ }
+ else if (_parentFlyoutPage == null)
+ NativeView.TitleView = TitleView;
+
+ }
+
+ void UpdateToolbarPlacement()
+ {
+ if (NativeView == null)
+ {
+ return;
+ }
+
+ NativeView.ToolbarPlacement = VirtualView.OnThisPlatform().GetToolbarPlacement();
+ }
+
+ void UpdateToolbarDynamicOverflowEnabled()
+ {
+ if (NativeView == null)
+ {
+ return;
+ }
+
+ NativeView.ToolbarDynamicOverflowEnabled = VirtualView.OnThisPlatform().GetToolbarDynamicOverflowEnabled();
+ }
+
+ public static void MapPadding(NavigationPageHandler handler, NavigationPage view) =>
+ handler.UpdatePadding();
+
+ public static void MapTitleColor(NavigationPageHandler handler, NavigationPage view) => handler.UpdateTitleColor();
+
+ public static void MapNavigationBarBackground(NavigationPageHandler handler, NavigationPage view) => handler.UpdateNavigationBarBackground();
+
+ // TODO MAUI: Task Based Mappers?
+ public static void MapTitleIcon(NavigationPageHandler handler, NavigationPage view) => handler.UpdateTitleIcon();
+
+ public static void MapTitleView(NavigationPageHandler handler, NavigationPage view) => handler.UpdateTitleView();
+
+ public static void MapToolbarPlacement(NavigationPageHandler handler, NavigationPage view) => handler.UpdateToolbarPlacement();
+
+ public static void MapToolbarDynamicOverflowEnabled(NavigationPageHandler handler, NavigationPage view) => handler.UpdateToolbarDynamicOverflowEnabled();
+ }
+}
diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.cs
new file mode 100644
index 000000000000..e8eb2a4b6942
--- /dev/null
+++ b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Maui.Handlers;
+
+#if WINDOWS
+using static Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific.Page;
+#endif
+
+namespace Microsoft.Maui.Controls.Handlers
+{
+ public partial class NavigationPageHandler
+ {
+ public static PropertyMapper NavigationPageMapper
+ = new PropertyMapper(ViewHandler.ViewMapper)
+ {
+ [NavigationPage.BarTextColorProperty.PropertyName] = MapTitleColor,
+ [NavigationPage.BarBackgroundColorProperty.PropertyName] = MapNavigationBarBackground,
+ [NavigationPage.BarBackgroundProperty.PropertyName] = MapNavigationBarBackground,
+ [nameof(IPadding.Padding)] = MapPadding,
+ [nameof(NavigationPage.TitleIconImageSourceProperty.PropertyName)] = MapTitleIcon,
+ [nameof(NavigationPage.TitleViewProperty.PropertyName)] = MapTitleView,
+
+#if WINDOWS
+ [nameof(ToolbarPlacementProperty.PropertyName)] = MapToolbarPlacement,
+ [nameof(ToolbarDynamicOverflowEnabledProperty.PropertyName)] = MapToolbarDynamicOverflowEnabled,
+#endif
+ };
+
+ public NavigationPageHandler() : base(NavigationPageMapper)
+ {
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.iOS.cs b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.iOS.cs
new file mode 100644
index 000000000000..17ca4d2df4c0
--- /dev/null
+++ b/src/Controls/src/Core/Handlers/NavigationPage/NavigationPageHandler.iOS.cs
@@ -0,0 +1,94 @@
+#nullable enable
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.Maui.Controls.Internals;
+using Microsoft.Maui.Controls.Platform;
+using Microsoft.Maui.Handlers;
+using UIKit;
+
+namespace Microsoft.Maui.Controls.Handlers
+{
+ public partial class NavigationPageHandler :
+ ViewHandler, INativeViewHandler
+ {
+ ControlsNavigationController _controlsNavigationController;
+ UIViewController? INativeViewHandler.ViewController => _controlsNavigationController;
+
+ protected override UIView CreateNativeView()
+ {
+ _controlsNavigationController = new ControlsNavigationController(this);
+
+ if (_controlsNavigationController.View == null)
+ throw new NullReferenceException("ControlsNavigationController.View is null");
+
+ return _controlsNavigationController.View;
+ }
+
+ public static void MapPadding(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapTitleColor(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapNavigationBarBackground(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapTitleIcon(NavigationPageHandler handler, NavigationPage view) { }
+
+ public static void MapTitleView(NavigationPageHandler handler, NavigationPage view) { }
+
+
+ protected override void ConnectHandler(UIView nativeView)
+ {
+ base.ConnectHandler(nativeView);
+
+ if (VirtualView == null)
+ return;
+
+ VirtualView.PushRequested += OnPushRequested;
+ VirtualView.PopRequested += OnPopRequested;
+ _controlsNavigationController.LoadPages(this.MauiContext);
+
+ //VirtualView.PopToRootRequested += OnPopToRootRequested;
+ //VirtualView.RemovePageRequested += OnRemovedPageRequested;
+ //VirtualView.InsertPageBeforeRequested += OnInsertPageBeforeRequested;
+ }
+
+ protected override void DisconnectHandler(UIView nativeView)
+ {
+ base.DisconnectHandler(nativeView);
+
+ if (VirtualView == null)
+ return;
+
+ VirtualView.PushRequested -= OnPushRequested;
+ VirtualView.PopRequested -= OnPopRequested;
+ //VirtualView.PopToRootRequested -= OnPopToRootRequested;
+ //VirtualView.RemovePageRequested -= OnRemovedPageRequested;
+ //VirtualView.InsertPageBeforeRequested -= OnInsertPageBeforeRequested;
+ }
+
+ void OnPopRequested(object? sender, NavigationRequestedEventArgs e)
+ {
+ _controlsNavigationController?
+ .OnPopRequestedAsync(e)
+ .FireAndForget((exc) => Log.Warning(nameof(NavigationPage), $"{exc}"));
+ }
+
+ void OnPushRequested(object? sender, NavigationRequestedEventArgs e)
+ {
+ _controlsNavigationController?
+ .OnPushRequested(e, this.MauiContext);
+ }
+
+ internal void SendPopping(Task popTask)
+ {
+ if (VirtualView == null)
+ return;
+
+ (VirtualView as INavigationPageController)?.PopAsyncInner(false, true)
+ .FireAndForget((exc) => Log.Warning(nameof(NavigationPage), $"{exc}"));
+ }
+ }
+}
diff --git a/src/Controls/src/Core/KnownColor.cs b/src/Controls/src/Core/KnownColor.cs
new file mode 100644
index 000000000000..de6d8826581f
--- /dev/null
+++ b/src/Controls/src/Core/KnownColor.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Microsoft.Maui.Graphics;
+
+namespace Microsoft.Maui.Controls
+{
+ public static class KnownColor
+ {
+ public static Color Default => null;
+
+ public static Color Transparent { get; } = new(255, 255, 255, 0);
+
+ public static void SetAccent(Color value) => Accent = value;
+
+ public static Color Accent { get; internal set; }
+ }
+}
diff --git a/src/Controls/src/Core/NavigationPage.cs b/src/Controls/src/Core/NavigationPage.cs
index 6d6d8eda2e9b..774bd6817bb6 100644
--- a/src/Controls/src/Core/NavigationPage.cs
+++ b/src/Controls/src/Core/NavigationPage.cs
@@ -8,7 +8,7 @@
namespace Microsoft.Maui.Controls
{
- public class NavigationPage : Page, IPageContainer, IBarElement, INavigationPageController, IElementConfiguration
+ public partial class NavigationPage : Page, IPageContainer, IBarElement, INavigationPageController, IElementConfiguration
{
public static readonly BindableProperty BackButtonTitleProperty = BindableProperty.CreateAttached("BackButtonTitle", typeof(string), typeof(Page), null);
@@ -176,7 +176,7 @@ public async Task PopAsync(bool animated)
else
CurrentNavigationTask = tcs.Task;
- var result = await PopAsyncInner(animated, false);
+ var result = await (this as INavigationPageController).PopAsyncInner(animated, false);
tcs.SetResult(true);
return result;
}
@@ -291,8 +291,7 @@ protected override bool OnBackButtonPressed()
[EditorBrowsable(EditorBrowsableState.Never)]
public event EventHandler InsertPageBeforeRequested;
- [EditorBrowsable(EditorBrowsableState.Never)]
- public async Task PopAsyncInner(bool animated, bool fast)
+ async Task INavigationPageController.PopAsyncInner(bool animated, bool fast)
{
if (StackDepth == 1)
{
diff --git a/src/Controls/src/Core/Platform/Android/ILifeCycleState.cs b/src/Controls/src/Core/Platform/Android/ILifeCycleState.cs
new file mode 100644
index 000000000000..9a846d421b34
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Android/ILifeCycleState.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+using Android.App;
+using Android.Content;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using Android.Widget;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal interface ILifeCycleState
+ {
+ bool MarkedForDispose { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Android/IManageFragments.cs b/src/Controls/src/Core/Platform/Android/IManageFragments.cs
new file mode 100644
index 000000000000..f79140210a5e
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Android/IManageFragments.cs
@@ -0,0 +1,13 @@
+using AndroidX.Fragment.App;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ ///
+ /// Allows the platform to inject child fragment managers for renderers
+ /// which do their own fragment management
+ ///
+ internal interface IManageFragments
+ {
+ void SetFragmentManager(FragmentManager fragmentManager);
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Android/MauiFragmentNavDestination.cs b/src/Controls/src/Core/Platform/Android/MauiFragmentNavDestination.cs
new file mode 100644
index 000000000000..ad39a594be30
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Android/MauiFragmentNavDestination.cs
@@ -0,0 +1,40 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using AndroidX.Navigation;
+using AndroidX.Navigation.Fragment;
+using Microsoft.Maui.Controls.Handlers;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ class MauiFragmentNavDestination : FragmentNavigator.Destination
+ {
+ public IPage Page { get; }
+ public IMauiContext MauiContext => NavigationPageHandler.MauiContext;
+ public NavigationPageHandler NavigationPageHandler { get; }
+
+ public MauiFragmentNavDestination(Navigator fragmentNavigator, IPage page, NavigationPageHandler navigationPageHandler) : base(fragmentNavigator)
+ {
+ _ = page ?? throw new ArgumentNullException(nameof(page));
+ _ = navigationPageHandler ?? throw new ArgumentNullException(nameof(navigationPageHandler));
+
+ SetClassName(Java.Lang.Class.FromType(typeof(NavHostPageFragment)).CanonicalName);
+ Id = global::Android.Views.View.GenerateViewId();
+ this.Page = page;
+ this.NavigationPageHandler = navigationPageHandler;
+ }
+
+
+ public static MauiFragmentNavDestination AddDestination(
+ IPage page,
+ NavigationPageHandler navigationPageHandler,
+ NavGraph navGraph,
+ FragmentNavigator navigator)
+ {
+ var destination = new MauiFragmentNavDestination(navigator, page, navigationPageHandler);
+
+ navGraph.AddDestination(destination);
+ return destination;
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Android/NavHostPageFragment.cs b/src/Controls/src/Core/Platform/Android/NavHostPageFragment.cs
new file mode 100644
index 000000000000..c9b3e817c977
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Android/NavHostPageFragment.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Android.OS;
+using Android.Runtime;
+using Android.Views;
+using AndroidX.Fragment.App;
+using AndroidX.Navigation.Fragment;
+using Microsoft.Maui.Controls.Handlers;
+using AView = Android.Views.View;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ class NavHostPageFragment : Fragment
+ {
+ NavHostFragment NavHost =>
+ (NavHostFragment)
+ Context
+ .GetFragmentManager()
+ .FindFragmentById(Resource.Id.nav_host);
+
+ protected NavHostPageFragment(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
+ {
+
+ }
+
+ public NavHostPageFragment()
+ {
+ }
+
+ MauiFragmentNavDestination NavDestination { get; set; }
+
+ public override AView OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
+ {
+ if (NavDestination == null)
+ {
+ NavDestination =
+ (MauiFragmentNavDestination)
+ NavHost.NavController.CurrentDestination;
+ }
+
+ _ = NavDestination ?? throw new ArgumentNullException(nameof(NavDestination));
+
+ return NavDestination.Page.ToNative(NavDestination.MauiContext);
+ }
+
+ public override void OnCreate(Bundle savedInstanceState)
+ {
+ base.OnCreate(savedInstanceState);
+ RequireActivity()
+ .OnBackPressedDispatcher
+ .AddCallback(this, new ProcessBackClick(this));
+ }
+
+ public void HandleOnBackPressed()
+ {
+ NavDestination.NavigationPageHandler.OnPop();
+ }
+
+ class ProcessBackClick : AndroidX.Activity.OnBackPressedCallback
+ {
+ NavHostPageFragment _navHostPageFragment;
+
+ public ProcessBackClick(NavHostPageFragment navHostPageFragment)
+ : base(true)
+ {
+ _navHostPageFragment = navHostPageFragment;
+ }
+
+ public override void HandleOnBackPressed()
+ {
+ _navHostPageFragment.HandleOnBackPressed();
+ }
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/BackgroundTracker.cs b/src/Controls/src/Core/Platform/Windows/BackgroundTracker.cs
new file mode 100644
index 000000000000..d5f9ca68e7ef
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/BackgroundTracker.cs
@@ -0,0 +1,81 @@
+using System;
+using System.ComponentModel;
+using Microsoft.Maui.Graphics;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Media.Imaging;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal sealed class BackgroundTracker : VisualElementTracker where T : FrameworkElement
+ {
+ readonly DependencyProperty _backgroundProperty;
+ bool _backgroundNeedsUpdate = true;
+
+ public BackgroundTracker(DependencyProperty backgroundProperty)
+ {
+ if (backgroundProperty == null)
+ throw new ArgumentNullException("backgroundProperty");
+
+ _backgroundProperty = backgroundProperty;
+ }
+
+ protected override void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.IsOneOf(VisualElement.BackgroundColorProperty, VisualElement.BackgroundProperty, Page.BackgroundImageSourceProperty))
+ {
+ UpdateBackground();
+ }
+
+ base.OnPropertyChanged(sender, e);
+ }
+
+ protected override void UpdateNativeControl()
+ {
+ base.UpdateNativeControl();
+
+ if (_backgroundNeedsUpdate)
+ UpdateBackground();
+ }
+
+ async void UpdateBackground()
+ {
+ if (Element == null)
+ return;
+
+ FrameworkElement element = Control ?? Container;
+ if (element == null)
+ return;
+
+ var backgroundImage = await Element.BackgroundImageSource.ToWindowsImageSourceAsync();
+
+ if (backgroundImage != null)
+ {
+ element.SetValue(_backgroundProperty, new ImageBrush { ImageSource = backgroundImage });
+ }
+ else
+ {
+ if (!Element.Background.IsEmpty)
+ {
+ element.SetValue(_backgroundProperty, Element.Background.ToBrush());
+ }
+ else
+ {
+ Color backgroundColor = Element.BackgroundColor;
+ if (!backgroundColor.IsDefault())
+ {
+ element.SetValue(_backgroundProperty, backgroundColor.ToNative());
+ }
+ else
+ {
+ object localBackground = element.ReadLocalValue(_backgroundProperty);
+ if (localBackground != null && localBackground != DependencyProperty.UnsetValue)
+ element.ClearValue(_backgroundProperty);
+ }
+ }
+ }
+
+ _backgroundNeedsUpdate = false;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/CompositionHelper.cs b/src/Controls/src/Core/Platform/Windows/CompositionHelper.cs
new file mode 100644
index 000000000000..583fa3fc770f
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/CompositionHelper.cs
@@ -0,0 +1,32 @@
+#nullable enable
+using System;
+using System.Linq;
+using System.Reflection;
+using Windows.UI.Composition;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ static class CompositionHelper
+ {
+ static bool SetTypePresent;
+ static bool IsTypePresent;
+
+ public static bool IsCompositionGeometryTypePresent
+ {
+ get
+ {
+ if (!SetTypePresent)
+ {
+ var compositorMethods = typeof(Compositor).GetMethods();
+ var createGeometricClipExists = compositorMethods.Any(m => m.Name == "CreateGeometricClip");
+ var createEllipseGeometryExists = compositorMethods.Any(m => m.Name == "CreateEllipseGeometry");
+
+ IsTypePresent = createGeometricClipExists && createEllipseGeometryExists;
+ SetTypePresent = true;
+ }
+
+ return IsTypePresent;
+ }
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/AccessibilityExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/AccessibilityExtensions.cs
new file mode 100644
index 000000000000..a1c23145dac4
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/AccessibilityExtensions.cs
@@ -0,0 +1,148 @@
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Automation.Peers;
+using NativeAutomationProperties = Microsoft.UI.Xaml.Automation.AutomationProperties;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public static class AccessibilityExtensions
+ {
+ public static void SetAutomationPropertiesAutomationId(this FrameworkElement Control, string id)
+ {
+ Control.SetValue(NativeAutomationProperties.AutomationIdProperty, id);
+ }
+
+ public static string SetAutomationPropertiesName(this FrameworkElement Control, Element Element, string _defaultAutomationPropertiesName = null)
+ {
+ if (Element == null)
+ return _defaultAutomationPropertiesName;
+
+ if (_defaultAutomationPropertiesName == null)
+ _defaultAutomationPropertiesName = (string)Control.GetValue(NativeAutomationProperties.NameProperty);
+
+ var elemValue = (string)Element.GetValue(AutomationProperties.NameProperty);
+
+ if (!string.IsNullOrWhiteSpace(elemValue))
+ Control.SetValue(NativeAutomationProperties.NameProperty, elemValue);
+ else
+ Control.SetValue(NativeAutomationProperties.NameProperty, _defaultAutomationPropertiesName);
+
+ return _defaultAutomationPropertiesName;
+ }
+
+ public static AccessibilityView? SetAutomationPropertiesAccessibilityView(this FrameworkElement Control, Element Element, AccessibilityView? _defaultAutomationPropertiesAccessibilityView = null)
+ {
+ if (Element == null)
+ return _defaultAutomationPropertiesAccessibilityView;
+
+ if (!_defaultAutomationPropertiesAccessibilityView.HasValue)
+ _defaultAutomationPropertiesAccessibilityView = (AccessibilityView)Control.GetValue(NativeAutomationProperties.AccessibilityViewProperty);
+
+ var newValue = _defaultAutomationPropertiesAccessibilityView;
+
+ var elemValue = (bool?)Element.GetValue(AutomationProperties.IsInAccessibleTreeProperty);
+
+ if (elemValue == true)
+ newValue = AccessibilityView.Content;
+ else if (elemValue == false)
+ newValue = AccessibilityView.Raw;
+
+ Control.SetValue(NativeAutomationProperties.AccessibilityViewProperty, newValue);
+
+ return _defaultAutomationPropertiesAccessibilityView;
+
+ }
+ public static string SetAutomationPropertiesHelpText(this FrameworkElement Control, Element Element, string _defaultAutomationPropertiesHelpText = null)
+ {
+ if (Element == null)
+ return _defaultAutomationPropertiesHelpText;
+
+ if (_defaultAutomationPropertiesHelpText == null)
+ _defaultAutomationPropertiesHelpText = (string)Control.GetValue(NativeAutomationProperties.HelpTextProperty);
+
+ var elemValue = (string)Element.GetValue(AutomationProperties.HelpTextProperty);
+
+ if (!string.IsNullOrWhiteSpace(elemValue))
+ Control.SetValue(NativeAutomationProperties.HelpTextProperty, elemValue);
+ else
+ Control.SetValue(NativeAutomationProperties.HelpTextProperty, _defaultAutomationPropertiesHelpText);
+
+ return _defaultAutomationPropertiesHelpText;
+ }
+
+ public static UIElement SetAutomationPropertiesLabeledBy(
+ this FrameworkElement Control,
+ Element Element,
+ IMauiContext mauiContext,
+ UIElement _defaultAutomationPropertiesLabeledBy = null)
+ {
+ if (Element == null)
+ return _defaultAutomationPropertiesLabeledBy;
+
+ // TODO Maui: this is a bit of a hack because Elements
+ // currently don't implement IFrameworkElement but they should
+ mauiContext ??= (Element as IFrameworkElement)?.Handler?.MauiContext;
+
+ if (_defaultAutomationPropertiesLabeledBy == null)
+ _defaultAutomationPropertiesLabeledBy = (UIElement)Control.GetValue(NativeAutomationProperties.LabeledByProperty);
+
+ var elemValue = (VisualElement)Element.GetValue(AutomationProperties.LabeledByProperty);
+
+ FrameworkElement nativeElement = null;
+
+ if(mauiContext != null)
+ nativeElement = (elemValue as IView)?.GetOrCreateHandler(mauiContext)?.NativeView as FrameworkElement;
+
+ if (nativeElement != null)
+ Control.SetValue(AutomationProperties.LabeledByProperty, nativeElement);
+ else
+ Control.SetValue(NativeAutomationProperties.LabeledByProperty, _defaultAutomationPropertiesLabeledBy);
+
+ return _defaultAutomationPropertiesLabeledBy;
+ }
+
+ // TODO MAUI: This is not having any effect on anything I've tested yet. See if we need it
+ // after we test the FP and NP w/ back button explicitly enabled.
+ public static void SetBackButtonTitle(this PageControl Control, Element Element)
+ {
+ if (Element == null)
+ return;
+
+ var elemValue = ConcatenateNameAndHint(Element);
+
+ Control.BackButtonTitle = elemValue;
+ }
+
+ static string ConcatenateNameAndHint(Element Element)
+ {
+ string separator;
+
+ var name = (string)Element.GetValue(AutomationProperties.NameProperty);
+
+ var hint = (string)Element.GetValue(AutomationProperties.HelpTextProperty);
+
+
+ if (string.IsNullOrWhiteSpace(name) || string.IsNullOrWhiteSpace(hint))
+ separator = "";
+
+ else
+ separator = ". ";
+
+
+ return string.Join(separator, name, hint);
+
+ }
+
+ public static void SetAutomationProperties(
+ this FrameworkElement frameworkElement,
+ Element element,
+ IMauiContext mauiContext,
+ string defaultName = null)
+ {
+ frameworkElement.SetAutomationPropertiesAutomationId(element?.AutomationId);
+ frameworkElement.SetAutomationPropertiesName(element, defaultName);
+ frameworkElement.SetAutomationPropertiesHelpText(element);
+ frameworkElement.SetAutomationPropertiesLabeledBy(element, mauiContext);
+ frameworkElement.SetAutomationPropertiesAccessibilityView(element);
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/AspectExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/AspectExtensions.cs
new file mode 100644
index 000000000000..ba3fcd80c8c0
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/AspectExtensions.cs
@@ -0,0 +1,23 @@
+using WStretch = Microsoft.UI.Xaml.Media.Stretch;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class AspectExtensions
+ {
+ public static WStretch ToStretch(this Aspect aspect)
+ {
+ switch (aspect)
+ {
+ case Aspect.Fill:
+ return WStretch.Fill;
+
+ case Aspect.AspectFill:
+ return WStretch.UniformToFill;
+
+ case Aspect.AspectFit:
+ default:
+ return WStretch.Uniform;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Compatibility/Core/src/WinUI/BrushExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/BrushExtensions.cs
similarity index 93%
rename from src/Compatibility/Core/src/WinUI/BrushExtensions.cs
rename to src/Controls/src/Core/Platform/Windows/Extensions/BrushExtensions.cs
index cc73d8d79014..be1c8da6af98 100644
--- a/src/Compatibility/Core/src/WinUI/BrushExtensions.cs
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/BrushExtensions.cs
@@ -6,7 +6,7 @@
using WPoint = Windows.Foundation.Point;
using WRadialGradientBrush = Microsoft.UI.Xaml.Media.RadialGradientBrush;
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
+namespace Microsoft.Maui.Controls.Platform
{
public static class BrushExtensions
{
@@ -22,7 +22,7 @@ public static WBrush ToBrush(this Brush brush)
return null;
}
- return solidColorBrush.Color.ToBrush();
+ return solidColorBrush.Color.ToNative();
}
if (brush is LinearGradientBrush linearGradientBrush)
@@ -43,7 +43,6 @@ public static WBrush ToBrush(this Brush brush)
};
}
-#if UWP_18362
if (brush is RadialGradientBrush radialGradientBrush)
{
var wRadialGradientBrush = new WRadialGradientBrush()
@@ -61,7 +60,6 @@ public static WBrush ToBrush(this Brush brush)
return wRadialGradientBrush;
}
-#endif
return null;
}
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/ClipExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/ClipExtensions.cs
new file mode 100644
index 000000000000..475ea014eb0a
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/ClipExtensions.cs
@@ -0,0 +1,60 @@
+using Microsoft.UI.Composition;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Hosting;
+using Microsoft.Maui.Controls.Shapes;
+using WRectangleGeometry = Microsoft.UI.Xaml.Media.RectangleGeometry;
+using WVector2 = System.Numerics.Vector2;
+
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class ClipExtensions
+ {
+ public static void Clip(this FrameworkElement frameworkElement, Geometry geometry)
+ {
+ var wGeometry = geometry.ToNative();
+
+ if (wGeometry is WRectangleGeometry wRectangleGeometry && frameworkElement.Clip != wRectangleGeometry)
+ frameworkElement.Clip = wRectangleGeometry;
+ }
+
+ public static void ClipVisual(this FrameworkElement frameworkElement, Geometry geometry)
+ {
+ var compositor = ElementCompositionPreview.GetElementVisual(frameworkElement).Compositor;
+ var visual = ElementCompositionPreview.GetElementVisual(frameworkElement);
+
+ CompositionClip compositionClip = null;
+
+ if (geometry is EllipseGeometry ellipseGeometry)
+ {
+ var compositionEllipseGeometry = compositor.CreateEllipseGeometry();
+
+ compositionEllipseGeometry.Center = new WVector2((float)ellipseGeometry.Center.X, (float)ellipseGeometry.Center.Y);
+ compositionEllipseGeometry.Radius = new WVector2((float)ellipseGeometry.RadiusX, (float)ellipseGeometry.RadiusY);
+
+ compositionClip = compositor.CreateGeometricClip(compositionEllipseGeometry);
+ }
+ else if (geometry is LineGeometry lineGeometry)
+ {
+ var compositionLineGeometry = compositor.CreateLineGeometry();
+
+ compositionLineGeometry.Start = new WVector2((float)lineGeometry.StartPoint.X, (float)lineGeometry.StartPoint.Y);
+ compositionLineGeometry.End = new WVector2((float)lineGeometry.EndPoint.X, (float)lineGeometry.EndPoint.Y);
+
+ compositionClip = compositor.CreateGeometricClip(compositionLineGeometry);
+ }
+ else if (geometry is RectangleGeometry rectangleGeometry)
+ {
+ var compositionRectangleGeometry = compositor.CreateRectangleGeometry();
+
+ compositionRectangleGeometry.Offset = new WVector2((float)rectangleGeometry.Rect.X, (float)rectangleGeometry.Rect.Y);
+ compositionRectangleGeometry.Size = new WVector2((float)rectangleGeometry.Rect.Width, (float)rectangleGeometry.Rect.Height);
+
+ compositionClip = compositor.CreateGeometricClip(compositionRectangleGeometry);
+ }
+
+ if (visual.Clip != compositionClip)
+ visual.Clip = compositionClip;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/Extensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/Extensions.cs
new file mode 100644
index 000000000000..4b93c4719447
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/Extensions.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading;
+using System.Threading.Tasks;
+using Windows.Foundation;
+using Windows.UI.Text;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Maui.Controls.Internals;
+using WImageSource = Microsoft.UI.Xaml.Media.ImageSource;
+using UwpScrollBarVisibility = Microsoft.UI.Xaml.Controls.ScrollBarVisibility;
+using Microsoft.UI.Xaml.Media.Imaging;
+//using Microsoft.Graphics.Canvas.UI.Xaml;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class Extensions
+ {
+ public static ConfiguredTaskAwaitable DontSync(this IAsyncOperation self)
+ {
+ return self.AsTask().ConfigureAwait(false);
+ }
+
+ public static ConfiguredTaskAwaitable DontSync(this IAsyncAction self)
+ {
+ return self.AsTask().ConfigureAwait(false);
+ }
+
+ public static void SetBinding(this FrameworkElement self, DependencyProperty property, string path)
+ {
+ self.SetBinding(property, new Microsoft.UI.Xaml.Data.Binding { Path = new PropertyPath(path) });
+ }
+
+ public static void SetBinding(this FrameworkElement self, DependencyProperty property, string path, Microsoft.UI.Xaml.Data.IValueConverter converter)
+ {
+ self.SetBinding(property, new Microsoft.UI.Xaml.Data.Binding { Path = new PropertyPath(path), Converter = converter });
+ }
+
+ internal static InputScopeNameValue GetKeyboardButtonType(this ReturnType returnType)
+ {
+ switch (returnType)
+ {
+ case ReturnType.Default:
+ case ReturnType.Done:
+ case ReturnType.Go:
+ case ReturnType.Next:
+ case ReturnType.Send:
+ return InputScopeNameValue.Default;
+ case ReturnType.Search:
+ return InputScopeNameValue.Search;
+ default:
+ throw new NotImplementedException($"ReturnType {returnType} not supported");
+ }
+ }
+
+ internal static InputScope ToInputScope(this ReturnType returnType)
+ {
+ var scopeName = new InputScopeName()
+ {
+ NameValue = GetKeyboardButtonType(returnType)
+ };
+
+ var inputScope = new InputScope
+ {
+ Names = { scopeName }
+ };
+
+ return inputScope;
+ }
+
+ internal static UwpScrollBarVisibility ToUwpScrollBarVisibility(this Maui.Controls.ScrollBarVisibility visibility)
+ {
+ switch (visibility)
+ {
+ case Maui.Controls.ScrollBarVisibility.Always:
+ return UwpScrollBarVisibility.Visible;
+ case Maui.Controls.ScrollBarVisibility.Default:
+ return UwpScrollBarVisibility.Auto;
+ case Maui.Controls.ScrollBarVisibility.Never:
+ return UwpScrollBarVisibility.Hidden;
+ default:
+ return UwpScrollBarVisibility.Auto;
+ }
+ }
+
+ public static T Clamp(this T value, T min, T max) where T : IComparable
+ {
+ if (value.CompareTo(min) < 0)
+ return min;
+ if (value.CompareTo(max) > 0)
+ return max;
+ return value;
+ }
+
+
+ internal static int ToEm(this double pt)
+ {
+ return Convert.ToInt32( pt * 0.0624f * 1000); //Coefficient for converting Pt to Em. The value is uniform spacing between characters, in units of 1/1000 of an em.
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/FrameworkElementExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/FrameworkElementExtensions.cs
new file mode 100644
index 000000000000..3c42f95cd852
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/FrameworkElementExtensions.cs
@@ -0,0 +1,145 @@
+using System;
+using System.Collections.Concurrent;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Maui.Controls.Internals;
+using WBinding = Microsoft.UI.Xaml.Data.Binding;
+using WBrush = Microsoft.UI.Xaml.Media.Brush;
+using WBindingExpression = Microsoft.UI.Xaml.Data.BindingExpression;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class FrameworkElementExtensions
+ {
+ static readonly Lazy> ForegroundProperties =
+ new Lazy>(() => new ConcurrentDictionary());
+
+ public static WBrush GetForeground(this FrameworkElement element)
+ {
+ if (element == null)
+ throw new ArgumentNullException("element");
+
+ return (WBrush)element.GetValue(GetForegroundProperty(element));
+ }
+
+ public static WBinding GetForegroundBinding(this FrameworkElement element)
+ {
+ WBindingExpression expr = element.GetBindingExpression(GetForegroundProperty(element));
+ if (expr == null)
+ return null;
+
+ return expr.ParentBinding;
+ }
+
+ public static object GetForegroundCache(this FrameworkElement element)
+ {
+ WBinding binding = GetForegroundBinding(element);
+ if (binding != null)
+ return binding;
+
+ return GetForeground(element);
+ }
+
+ public static void RestoreForegroundCache(this FrameworkElement element, object cache)
+ {
+ var binding = cache as WBinding;
+ if (binding != null)
+ SetForeground(element, binding);
+ else
+ SetForeground(element, (WBrush)cache);
+ }
+
+ public static void SetForeground(this FrameworkElement element, WBrush foregroundBrush)
+ {
+ if (element == null)
+ throw new ArgumentNullException("element");
+
+ element.SetValue(GetForegroundProperty(element), foregroundBrush);
+ }
+
+ public static void SetForeground(this FrameworkElement element, WBinding binding)
+ {
+ if (element == null)
+ throw new ArgumentNullException("element");
+
+ element.SetBinding(GetForegroundProperty(element), binding);
+ }
+
+ internal static IEnumerable GetDescendantsByName(this DependencyObject parent, string elementName) where T : DependencyObject
+ {
+ int myChildrenCount = VisualTreeHelper.GetChildrenCount(parent);
+ for (int i = 0; i < myChildrenCount; i++)
+ {
+ var child = VisualTreeHelper.GetChild(parent, i);
+ var controlName = child.GetValue(FrameworkElement.NameProperty) as string;
+ if (controlName == elementName && child is T)
+ yield return child as T;
+ else
+ {
+ foreach (var subChild in child.GetDescendantsByName(elementName))
+ yield return subChild;
+ }
+ }
+ }
+
+ internal static T GetFirstDescendant(this DependencyObject element) where T : FrameworkElement
+ {
+ int count = VisualTreeHelper.GetChildrenCount(element);
+ for (var i = 0; i < count; i++)
+ {
+ DependencyObject child = VisualTreeHelper.GetChild(element, i);
+
+ T target = child as T ?? GetFirstDescendant(child);
+ if (target != null)
+ return target;
+ }
+
+ return null;
+ }
+
+ static DependencyProperty GetForegroundProperty(FrameworkElement element)
+ {
+ if (element is Control)
+ return Control.ForegroundProperty;
+ if (element is TextBlock)
+ return TextBlock.ForegroundProperty;
+
+ Type type = element.GetType();
+
+ DependencyProperty foregroundProperty;
+ if (!ForegroundProperties.Value.TryGetValue(type, out foregroundProperty))
+ {
+ FieldInfo field = ReflectionExtensions.GetFields(type).FirstOrDefault(f => f.Name == "ForegroundProperty");
+ if (field == null)
+ throw new ArgumentException("type is not a Foregroundable type");
+
+ var property = (DependencyProperty)field.GetValue(null);
+ ForegroundProperties.Value.TryAdd(type, property);
+
+ return property;
+ }
+
+ return foregroundProperty;
+ }
+
+ internal static IEnumerable GetChildren(this DependencyObject parent) where T : DependencyObject
+ {
+ int myChildrenCount = VisualTreeHelper.GetChildrenCount(parent);
+ for (int i = 0; i < myChildrenCount; i++)
+ {
+ var child = VisualTreeHelper.GetChild(parent, i);
+ if (child is T)
+ yield return child as T;
+ else
+ {
+ foreach (var subChild in child.GetChildren())
+ yield return subChild;
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Compatibility/Core/src/WinUI/GeometryExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/GeometryExtensions.cs
similarity index 82%
rename from src/Compatibility/Core/src/WinUI/GeometryExtensions.cs
rename to src/Controls/src/Core/Platform/Windows/Extensions/GeometryExtensions.cs
index e505ea28d78f..54664a8bee98 100644
--- a/src/Compatibility/Core/src/WinUI/GeometryExtensions.cs
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/GeometryExtensions.cs
@@ -1,12 +1,17 @@
+using System;
using Microsoft.Maui.Controls.Shapes;
using WFoundation = Windows.Foundation;
using WMedia = Microsoft.UI.Xaml.Media;
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
+namespace Microsoft.Maui.Controls.Platform
{
public static class GeometryExtensions
{
- public static WMedia.Geometry ToWindows(this Geometry geometry)
+ [Obsolete("ToWindows is obsolete. Please use ToNative instead")]
+ public static WMedia.Geometry ToWindows(this Geometry geometry) =>
+ geometry.ToNative();
+
+ public static WMedia.Geometry ToNative(this Geometry geometry)
{
WMedia.Geometry wGeometry = null;
@@ -15,8 +20,8 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
LineGeometry lineGeometry = geometry as LineGeometry;
wGeometry = new WMedia.LineGeometry
{
- StartPoint = lineGeometry.StartPoint.ToWindows(),
- EndPoint = lineGeometry.EndPoint.ToWindows()
+ StartPoint = lineGeometry.StartPoint.ToNative(),
+ EndPoint = lineGeometry.EndPoint.ToNative()
};
}
else if (geometry is RectangleGeometry)
@@ -32,7 +37,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
EllipseGeometry ellipseGeometry = geometry as EllipseGeometry;
wGeometry = new WMedia.EllipseGeometry
{
- Center = ellipseGeometry.Center.ToWindows(),
+ Center = ellipseGeometry.Center.ToNative(),
RadiusX = ellipseGeometry.RadiusX,
RadiusY = ellipseGeometry.RadiusY
};
@@ -47,7 +52,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
foreach (Geometry children in geometryGroup.Children)
{
- WMedia.Geometry winChild = children.ToWindows();
+ WMedia.Geometry winChild = children.ToNative();
(wGeometry as WMedia.GeometryGroup).Children.Add(winChild);
}
}
@@ -64,7 +69,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
{
WMedia.PathFigure wPathFigure = new WMedia.PathFigure
{
- StartPoint = xamPathFigure.StartPoint.ToWindows(),
+ StartPoint = xamPathFigure.StartPoint.ToNative(),
IsFilled = xamPathFigure.IsFilled,
IsClosed = xamPathFigure.IsClosed
};
@@ -79,7 +84,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
WMedia.LineSegment winSegment = new WMedia.LineSegment
{
- Point = lineSegment.Point.ToWindows()
+ Point = lineSegment.Point.ToNative()
};
wPathFigure.Segments.Add(winSegment);
@@ -93,7 +98,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
foreach (var point in polyLineSegment.Points)
{
- wSegment.Points.Add(point.ToWindows());
+ wSegment.Points.Add(point.ToNative());
}
wPathFigure.Segments.Add(wSegment);
@@ -106,9 +111,9 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
WMedia.BezierSegment wSegment = new WMedia.BezierSegment
{
- Point1 = bezierSegment.Point1.ToWindows(),
- Point2 = bezierSegment.Point2.ToWindows(),
- Point3 = bezierSegment.Point3.ToWindows()
+ Point1 = bezierSegment.Point1.ToNative(),
+ Point2 = bezierSegment.Point2.ToNative(),
+ Point3 = bezierSegment.Point3.ToNative()
};
wPathFigure.Segments.Add(wSegment);
@@ -121,7 +126,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
foreach (var point in polyBezierSegment.Points)
{
- wSegment.Points.Add(point.ToWindows());
+ wSegment.Points.Add(point.ToNative());
}
wPathFigure.Segments.Add(wSegment);
@@ -134,8 +139,8 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
WMedia.QuadraticBezierSegment wSegment = new WMedia.QuadraticBezierSegment
{
- Point1 = quadraticBezierSegment.Point1.ToWindows(),
- Point2 = quadraticBezierSegment.Point2.ToWindows()
+ Point1 = quadraticBezierSegment.Point1.ToNative(),
+ Point2 = quadraticBezierSegment.Point2.ToNative()
};
wPathFigure.Segments.Add(wSegment);
@@ -148,7 +153,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
foreach (var point in polyQuadraticBezierSegment.Points)
{
- wSegment.Points.Add(point.ToWindows());
+ wSegment.Points.Add(point.ToNative());
}
wPathFigure.Segments.Add(wSegment);
@@ -164,7 +169,7 @@ public static WMedia.Geometry ToWindows(this Geometry geometry)
RotationAngle = arcSegment.RotationAngle,
IsLargeArc = arcSegment.IsLargeArc,
SweepDirection = arcSegment.SweepDirection == SweepDirection.Clockwise ? WMedia.SweepDirection.Clockwise : WMedia.SweepDirection.Counterclockwise,
- Point = arcSegment.Point.ToWindows()
+ Point = arcSegment.Point.ToNative()
};
wPathFigure.Segments.Add(wSegment);
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/ImageExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/ImageExtensions.cs
new file mode 100644
index 000000000000..cce1a59eeb4d
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/ImageExtensions.cs
@@ -0,0 +1,130 @@
+using System;
+using Microsoft.Graphics.Canvas.UI.Xaml;
+using Microsoft.UI.Xaml.Media.Imaging;
+using System.Runtime.CompilerServices;
+using System.Threading;
+using System.Threading.Tasks;
+using Windows.Foundation;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.Maui.Controls.Internals;
+using WImageSource = Microsoft.UI.Xaml.Media.ImageSource;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class ImageExtensions
+ {
+ public static Graphics.Size GetImageSourceSize(this WImageSource source)
+ {
+ if (source is null)
+ {
+ return Graphics.Size.Zero;
+ }
+ else if (source is BitmapSource bitmap)
+ {
+ return new Graphics.Size
+ {
+ Width = bitmap.PixelWidth,
+ Height = bitmap.PixelHeight
+ };
+ }
+ else if (source is CanvasImageSource canvas)
+ {
+ return new Graphics.Size
+ {
+ Width = canvas.Size.Width,
+ Height = canvas.Size.Height
+ };
+ }
+
+ throw new InvalidCastException($"\"{source.GetType().FullName}\" is not supported.");
+ }
+
+ public static Microsoft.UI.Xaml.Controls.IconSource ToWindowsIconSource(this ImageSource source)
+ {
+ return source.ToWindowsIconSourceAsync().GetAwaiter().GetResult();
+ }
+
+ public static async Task ToWindowsIconSourceAsync(this ImageSource source, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (source == null || source.IsEmpty)
+ return null;
+
+ var handler = Registrar.Registered.GetHandlerForObject(source);
+ if (handler == null)
+ return null;
+
+ try
+ {
+ return await handler.LoadIconSourceAsync(source, cancellationToken);
+ }
+ catch (OperationCanceledException)
+ {
+ // no-op
+ }
+
+ return null;
+ }
+
+ public static IconElement ToWindowsIconElement(this ImageSource source)
+ {
+ return source.ToWindowsIconElementAsync().GetAwaiter().GetResult();
+ }
+
+ public static async Task ToWindowsIconElementAsync(this ImageSource source, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (source == null || source.IsEmpty)
+ return null;
+
+ var handler = Registrar.Registered.GetHandlerForObject(source);
+ if (handler == null)
+ return null;
+
+ try
+ {
+ return await handler.LoadIconElementAsync(source, cancellationToken);
+ }
+ catch (OperationCanceledException)
+ {
+ // no-op
+ }
+
+ return null;
+ }
+
+ public static WImageSource ToWindowsImageSource(this ImageSource source)
+ {
+ return source.ToWindowsImageSourceAsync().GetAwaiter().GetResult();
+ }
+
+ public static async Task ToWindowsImageSourceAsync(this ImageSource source, CancellationToken cancellationToken = default(CancellationToken))
+ {
+ if (source == null || source.IsEmpty)
+ return null;
+
+ var handler = Registrar.Registered.GetHandlerForObject(source);
+ if (handler == null)
+ return null;
+
+ try
+ {
+ return await handler.LoadImageAsync(source, cancellationToken);
+ }
+ catch (OperationCanceledException)
+ {
+ Log.Warning("Image loading", "Image load cancelled");
+ }
+ catch (Exception ex)
+ {
+ Log.Warning("Image loading", $"Image load failed: {ex}");
+#if DEBUG
+ throw;
+#endif
+ }
+
+ return null;
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/PointExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/PointExtensions.cs
new file mode 100644
index 000000000000..e00e2d0f5219
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/PointExtensions.cs
@@ -0,0 +1,12 @@
+using System;
+using Microsoft.Maui.Graphics;
+using WPoint = Windows.Foundation.Point;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public static class PointExtensions
+ {
+ [Obsolete("ToWindows is obsolete. Please use ToNative instead")]
+ public static WPoint ToWindows(this Point point) => point.ToNative();
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/TextBlockExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/TextBlockExtensions.cs
new file mode 100644
index 000000000000..dd033806716c
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/TextBlockExtensions.cs
@@ -0,0 +1,50 @@
+using System;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class TextBlockExtensions
+ {
+ public static void UpdateLineBreakMode(this TextBlock textBlock, LineBreakMode lineBreakMode)
+ {
+ if (textBlock == null)
+ return;
+
+ switch (lineBreakMode)
+ {
+ case LineBreakMode.NoWrap:
+ textBlock.TextTrimming = TextTrimming.Clip;
+ textBlock.TextWrapping = TextWrapping.NoWrap;
+ break;
+ case LineBreakMode.WordWrap:
+ textBlock.TextTrimming = TextTrimming.None;
+ textBlock.TextWrapping = TextWrapping.Wrap;
+ break;
+ case LineBreakMode.CharacterWrap:
+ textBlock.TextTrimming = TextTrimming.WordEllipsis;
+ textBlock.TextWrapping = TextWrapping.Wrap;
+ break;
+ case LineBreakMode.HeadTruncation:
+ // TODO: This truncates at the end.
+ textBlock.TextTrimming = TextTrimming.WordEllipsis;
+ DetermineTruncatedTextWrapping(textBlock);
+ break;
+ case LineBreakMode.TailTruncation:
+ textBlock.TextTrimming = TextTrimming.CharacterEllipsis;
+ DetermineTruncatedTextWrapping(textBlock);
+ break;
+ case LineBreakMode.MiddleTruncation:
+ // TODO: This truncates at the end.
+ textBlock.TextTrimming = TextTrimming.WordEllipsis;
+ DetermineTruncatedTextWrapping(textBlock);
+ break;
+ default:
+ throw new ArgumentOutOfRangeException();
+ }
+ }
+
+ static void DetermineTruncatedTextWrapping(TextBlock textBlock) =>
+ textBlock.TextWrapping = textBlock.MaxLines > 1 ? TextWrapping.Wrap : TextWrapping.NoWrap;
+ }
+}
diff --git a/src/Compatibility/Core/src/WinUI/Extensions/TransformExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/TransformExtensions.cs
similarity index 68%
rename from src/Compatibility/Core/src/WinUI/Extensions/TransformExtensions.cs
rename to src/Controls/src/Core/Platform/Windows/Extensions/TransformExtensions.cs
index c1d9ca83f432..2081b5d68fcb 100644
--- a/src/Compatibility/Core/src/WinUI/Extensions/TransformExtensions.cs
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/TransformExtensions.cs
@@ -1,16 +1,9 @@
using Microsoft.Maui.Controls.Shapes;
-#if WINDOWS_UWP
using WMatrix = Microsoft.UI.Xaml.Media.Matrix;
using WMatrixTransform = Microsoft.UI.Xaml.Media.MatrixTransform;
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
-#else
-using WMatrix = System.Windows.Media.Matrix;
-using WMatrixTransform = System.Windows.Media.MatrixTransform;
-
-namespace Microsoft.Maui.Controls.Compatibility.Platform.WPF
-#endif
+namespace Microsoft.Maui.Controls.Platform
{
public static class TransformExtensions
{
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/ViewExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/ViewExtensions.cs
new file mode 100644
index 000000000000..28e42188fdc8
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/ViewExtensions.cs
@@ -0,0 +1,20 @@
+using System.Collections.Generic;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal static class ViewExtensions
+ {
+ public static IEnumerable GetParentPages(this IView target)
+ {
+ var result = new List();
+ var parent = target.Parent as IPage;
+ while (!Application.IsApplicationOrNull(parent))
+ {
+ result.Add(parent);
+ parent = parent.Parent as IPage;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/VisualElementExtensions.cs b/src/Controls/src/Core/Platform/Windows/Extensions/VisualElementExtensions.cs
new file mode 100644
index 000000000000..6c29acfb9222
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/VisualElementExtensions.cs
@@ -0,0 +1,48 @@
+using System;
+using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public static class VisualElementExtensions
+ {
+ public static IViewHandler GetOrCreateHandler(this IView self, IMauiContext mauiContext)
+ {
+ if (self == null)
+ throw new ArgumentNullException("self");
+
+ if (self.Handler != null)
+ return self.Handler;
+
+ self.ToNative(mauiContext);
+ return self.Handler;
+ }
+
+ // TODO MAUI Make this work against IVIEW
+ internal static void Cleanup(this VisualElement self)
+ {
+ if (self == null)
+ throw new ArgumentNullException("self");
+
+ IViewHandler handler = self.Handler;
+
+ foreach (Element element in self.Descendants())
+ {
+ var visual = element as VisualElement;
+ if (visual == null)
+ continue;
+
+ visual.Handler = null;
+ }
+
+ self.Handler = null;
+ }
+
+ internal static bool UseFormsVsm(this T element) where T : VisualElement, IElementConfiguration
+ {
+ // Determine whether we're letting the VSM handle the colors or doing it the old way
+ // or disabling the legacy color management and doing it the old-old (pre 2.0) way
+ return element.HasVisualStateGroups()
+ || !element.OnThisPlatform().GetIsLegacyColorModeEnabled();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/Extensions/WinUIHelpers.cs b/src/Controls/src/Core/Platform/Windows/Extensions/WinUIHelpers.cs
new file mode 100644
index 000000000000..e12a5f6439b0
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Extensions/WinUIHelpers.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using WThickness = Microsoft.UI.Xaml.Thickness;
+using WCornerRadius = Microsoft.UI.Xaml.CornerRadius;
+using WGridLength = Microsoft.UI.Xaml.GridLength;
+using UwpGridUnitType = Microsoft.UI.Xaml.GridUnitType;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ static class WinUIHelpers
+ {
+ public static WThickness CreateThickness(double left, double top, double right, double bottom)
+ {
+ return new WThickness
+ {
+ Left = left,
+ Top = top,
+ Right = right,
+ Bottom = bottom
+ };
+ }
+
+ public static WThickness CreateThickness(double all)
+ {
+ return new WThickness
+ {
+ Left = all,
+ Top = all,
+ Right = all,
+ Bottom = all
+ };
+ }
+ public static WCornerRadius CreateCornerRadius(double left, double top, double right, double bottom)
+ {
+ return new WCornerRadius
+ {
+ TopLeft = left,
+ TopRight = top,
+ BottomRight = right,
+ BottomLeft = bottom
+ };
+ }
+
+ public static WCornerRadius CreateCornerRadius(double all)
+ {
+ return new WCornerRadius
+ {
+ TopLeft = all,
+ TopRight = all,
+ BottomRight = all,
+ BottomLeft = all
+ };
+ }
+
+ public static WGridLength CreateGridLength(int v, UwpGridUnitType auto)
+ {
+ return new WGridLength(v, auto);
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/IDontGetFocus.cs b/src/Controls/src/Core/Platform/Windows/IDontGetFocus.cs
new file mode 100644
index 000000000000..d1229d0f97a2
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/IDontGetFocus.cs
@@ -0,0 +1,6 @@
+namespace Microsoft.Maui.Controls.Platform
+{
+ public interface IDontGetFocus
+ {
+ }
+}
diff --git a/src/Compatibility/Core/src/WinUI/IIconElementHandler.cs b/src/Controls/src/Core/Platform/Windows/IIconElementHandler.cs
similarity index 87%
rename from src/Compatibility/Core/src/WinUI/IIconElementHandler.cs
rename to src/Controls/src/Core/Platform/Windows/IIconElementHandler.cs
index c352fdb4b032..642395bbb505 100644
--- a/src/Compatibility/Core/src/WinUI/IIconElementHandler.cs
+++ b/src/Controls/src/Core/Platform/Windows/IIconElementHandler.cs
@@ -2,7 +2,7 @@
using System.Threading.Tasks;
using Microsoft.UI.Xaml.Controls;
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
+namespace Microsoft.Maui.Controls.Platform
{
public interface IIconElementHandler : IRegisterable
{
diff --git a/src/Compatibility/Core/src/WinUI/IImageSourceHandler.cs b/src/Controls/src/Core/Platform/Windows/IImageSourceHandler.cs
similarity index 81%
rename from src/Compatibility/Core/src/WinUI/IImageSourceHandler.cs
rename to src/Controls/src/Core/Platform/Windows/IImageSourceHandler.cs
index e28e30f767cc..0afa367f6efe 100644
--- a/src/Compatibility/Core/src/WinUI/IImageSourceHandler.cs
+++ b/src/Controls/src/Core/Platform/Windows/IImageSourceHandler.cs
@@ -1,7 +1,7 @@
using System.Threading;
using System.Threading.Tasks;
-namespace Microsoft.Maui.Controls.Compatibility.Platform.UWP
+namespace Microsoft.Maui.Controls.Platform
{
public interface IImageSourceHandler : IRegisterable
{
diff --git a/src/Controls/src/Core/Platform/Windows/ITabStopOnDescendants.cs b/src/Controls/src/Core/Platform/Windows/ITabStopOnDescendants.cs
new file mode 100644
index 000000000000..1bddbd1b0e67
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ITabStopOnDescendants.cs
@@ -0,0 +1,6 @@
+namespace Microsoft.Maui.Controls.Platform
+{
+ public interface ITabStopOnDescendants : IDontGetFocus
+ {
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/ITitleIconProvider.cs b/src/Controls/src/Core/Platform/Windows/ITitleIconProvider.cs
new file mode 100644
index 000000000000..89db007f9787
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ITitleIconProvider.cs
@@ -0,0 +1,7 @@
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal interface ITitleIconProvider
+ {
+ Microsoft.UI.Xaml.Media.ImageSource TitleIcon { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/ITitleProvider.cs b/src/Controls/src/Core/Platform/Windows/ITitleProvider.cs
new file mode 100644
index 000000000000..c4cbfc5e8ba8
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ITitleProvider.cs
@@ -0,0 +1,15 @@
+using WBrush = Microsoft.UI.Xaml.Media.Brush;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal interface ITitleProvider
+ {
+ WBrush BarBackgroundBrush { set; }
+
+ WBrush BarForegroundBrush { set; }
+
+ bool ShowTitle { get; set; }
+
+ string Title { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/ITitleViewProvider.cs b/src/Controls/src/Core/Platform/Windows/ITitleViewProvider.cs
new file mode 100644
index 000000000000..558a514ec898
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ITitleViewProvider.cs
@@ -0,0 +1,7 @@
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal interface ITitleViewProvider
+ {
+ View TitleView { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/ITitleViewRendererController.cs b/src/Controls/src/Core/Platform/Windows/ITitleViewRendererController.cs
new file mode 100644
index 000000000000..60adf5b3f54c
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ITitleViewRendererController.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal interface ITitleViewRendererController
+ {
+ View TitleView { get; }
+ FrameworkElement TitleViewPresenter { get; }
+ Visibility TitleViewVisibility { get; set; }
+ CommandBar CommandBar { get; }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/IToolBarForegroundBinder.cs b/src/Controls/src/Core/Platform/Windows/IToolBarForegroundBinder.cs
new file mode 100644
index 000000000000..0eabc80b4ce2
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/IToolBarForegroundBinder.cs
@@ -0,0 +1,10 @@
+using Microsoft.UI.Xaml.Controls;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal interface IToolBarForegroundBinder
+ {
+ void BindForegroundColor(AppBar appBar);
+ void BindForegroundColor(AppBarButton button);
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/IToolbarProvider.cs b/src/Controls/src/Core/Platform/Windows/IToolbarProvider.cs
new file mode 100644
index 000000000000..e205053cce1f
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/IToolbarProvider.cs
@@ -0,0 +1,10 @@
+using System.Threading.Tasks;
+using Microsoft.UI.Xaml.Controls;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal interface IToolbarProvider
+ {
+ Task GetCommandBarAsync();
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/ImageConverter.cs b/src/Controls/src/Core/Platform/Windows/ImageConverter.cs
new file mode 100644
index 000000000000..59bd32c13766
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ImageConverter.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.Maui.Controls.Internals;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public class ImageConverter : Microsoft.UI.Xaml.Data.IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, string language)
+ {
+ return value is ImageSource source
+ ? source.ToWindowsImageSourceAsync().AsAsyncValue()
+ : null;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, string language)
+ {
+ throw new NotSupportedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/ImageSourceIconElementConverter.cs b/src/Controls/src/Core/Platform/Windows/ImageSourceIconElementConverter.cs
new file mode 100644
index 000000000000..e618b851f715
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ImageSourceIconElementConverter.cs
@@ -0,0 +1,20 @@
+using System;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal class ImageSourceIconElementConverter : Microsoft.UI.Xaml.Data.IValueConverter
+ {
+ public object Convert(object value, Type targetType, object parameter, string language)
+ {
+ if (value is ImageSource source)
+ return source.ToWindowsIconElement();
+
+ return null;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, string language)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/MauiCommandBar.cs b/src/Controls/src/Core/Platform/Windows/MauiCommandBar.cs
new file mode 100644
index 000000000000..ac02f3e56442
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/MauiCommandBar.cs
@@ -0,0 +1,150 @@
+using System;
+using Windows.Foundation.Collections;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Data;
+using Microsoft.UI.Xaml.Media;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public class MauiCommandBar : CommandBar
+ {
+ Microsoft.UI.Xaml.Controls.Button _moreButton;
+ Microsoft.UI.Xaml.Controls.ItemsControl _primaryItemsControl;
+ bool _isInValidLocation;
+
+ public MauiCommandBar()
+ {
+ PrimaryCommands.VectorChanged += OnCommandsChanged;
+ SecondaryCommands.VectorChanged += OnCommandsChanged;
+ UpdateVisibility();
+ WatchForContentChanges();
+ }
+
+ // Set by the container if the container is a valid place to show a toolbar.
+ // This exists to provide consistency with the other platforms; we've got
+ // rules in place that limit toolbars to Navigation Page and to Tabbed
+ // and Flyout-Detail Pages when they're currently displaying a Navigation Page
+ public bool IsInValidLocation
+ {
+ get { return _isInValidLocation; }
+ set
+ {
+ _isInValidLocation = value;
+ UpdateVisibility();
+ }
+ }
+
+ protected override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _moreButton = GetTemplateChild("MoreButton") as Microsoft.UI.Xaml.Controls.Button;
+ _primaryItemsControl = GetTemplateChild("PrimaryItemsControl") as Microsoft.UI.Xaml.Controls.ItemsControl;
+ }
+
+ void OnCommandsChanged(IObservableVector sender, IVectorChangedEventArgs args)
+ {
+ UpdateVisibility();
+ }
+
+ void UpdateVisibility()
+ {
+ // Determine whether we have a title (or some other content) inside this command bar
+ var frameworkElement = Content as FrameworkElement;
+
+ // Apply the rules for consistency with other platforms
+
+ // Not in one of the acceptable toolbar locations from the other platforms
+ if (!IsInValidLocation)
+ {
+ // If there's no title to display (e.g., toolbarplacement is set to bottom)
+ // or the title is collapsed (e.g., because it's empty)
+ if (frameworkElement == null || frameworkElement.Visibility != Visibility.Visible)
+ {
+ // Just collapse the whole thing
+ Visibility = Visibility.Collapsed;
+ return;
+ }
+
+ // The title needs to be visible, but we're not allowed to show a toolbar
+ // So we need to hide the toolbar items
+
+ Visibility = Visibility.Visible;
+
+ if (_moreButton != null)
+ {
+ _moreButton.Visibility = Visibility.Collapsed;
+ }
+
+ if (_primaryItemsControl != null)
+ {
+ _primaryItemsControl.Visibility = Visibility.Collapsed;
+ }
+
+ return;
+ }
+
+ // We're in one of the acceptable toolbar locations from the other platforms so the normal rules apply
+
+ if (_primaryItemsControl != null)
+ {
+ // This is normally visible by default, but it might have been collapsed by the toolbar consistency rules above
+ _primaryItemsControl.Visibility = Visibility.Visible;
+ }
+
+ // Are there any commands to display?
+ var visibility = PrimaryCommands.Count + SecondaryCommands.Count > 0 ? Visibility.Visible : Visibility.Collapsed;
+
+ if (_moreButton != null)
+ {
+ // The "..." button should only be visible if we have commands to display
+ _moreButton.Visibility = visibility;
+
+ // There *is* an OverflowButtonVisibility property that does more or less the same thing,
+ // but it became available in 10.0.14393.0 and we have to support 10.0.10240
+ }
+
+ if (frameworkElement != null && frameworkElement.Visibility != Visibility.Collapsed)
+ {
+ // If there's a title to display, we have to be visible whether or not we have commands
+ Visibility = Visibility.Visible;
+ }
+ else
+ {
+ // Otherwise, visibility depends on whether we have commands
+ Visibility = visibility;
+ }
+ }
+
+ void WatchForContentChanges()
+ {
+ // If the content of the command bar changes while it's collapsed, we need to
+ // react and update the visibility (e.g., if the bar is placed at the bottom and
+ // has no commands, then is moved to the top and now includes the title)
+
+ // There's no event on CommandBar when the content changes, so we'll bind our own
+ // dependency property to Content and update our visibility when it changes
+ var binding = new Microsoft.UI.Xaml.Data.Binding
+ {
+ Source = this,
+ Path = new PropertyPath(nameof(Content)),
+ Mode = Microsoft.UI.Xaml.Data.BindingMode.OneWay
+ };
+
+ BindingOperations.SetBinding(this, s_contentChangeWatcher, binding);
+ }
+
+ static readonly DependencyProperty s_contentChangeWatcher =
+ DependencyProperty.Register(
+ "ContentChangeWatcher",
+ typeof(object),
+ typeof(object),
+ new PropertyMetadata(null, ContentChanged));
+
+ static void ContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+ {
+ (d as MauiCommandBar)?.UpdateVisibility();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/MauiPresenter.cs b/src/Controls/src/Core/Platform/Windows/MauiPresenter.cs
new file mode 100644
index 000000000000..4c46fa6b9250
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/MauiPresenter.cs
@@ -0,0 +1,30 @@
+using System;
+using Microsoft.UI.Xaml;
+using Microsoft.Maui.Controls;
+using Microsoft.Maui.Graphics;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal class MauiPresenter : Microsoft.UI.Xaml.Controls.ContentPresenter
+ {
+ public MauiPresenter()
+ {
+ Loaded += FormsPresenter_Loaded;
+ Unloaded += FormsPresenter_Unloaded;
+ SizeChanged += (s, e) =>
+ {
+ if (ActualWidth > 0 && ActualHeight > 0 && DataContext != null)
+ {
+ var page = (Page)DataContext;
+ ((Page)page.RealParent).ContainerArea = new Rectangle(0, 0, ActualWidth, ActualHeight);
+ }
+ };
+ }
+
+ void FormsPresenter_Loaded(object sender, RoutedEventArgs e)
+ => (DataContext as Page)?.SendAppearing();
+
+ void FormsPresenter_Unloaded(object sender, RoutedEventArgs e)
+ => (DataContext as Page)?.SendDisappearing();
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/MenuItemCommand.cs b/src/Controls/src/Core/Platform/Windows/MenuItemCommand.cs
new file mode 100644
index 000000000000..a89c25367aa5
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/MenuItemCommand.cs
@@ -0,0 +1,42 @@
+using System;
+using System.ComponentModel;
+using System.Windows.Input;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal class MenuItemCommand : ICommand
+ {
+ readonly MenuItem _menuItem;
+
+ public MenuItemCommand(MenuItem item)
+ {
+ _menuItem = item;
+ _menuItem.PropertyChanged += OnElementPropertyChanged;
+ }
+
+ public virtual bool CanExecute(object parameter)
+ {
+ return _menuItem.IsEnabled;
+ }
+
+ public event EventHandler CanExecuteChanged;
+
+ public void Execute(object parameter)
+ {
+ ((IMenuItemController)_menuItem).Activate();
+ }
+
+ void OnCanExecuteChanged()
+ {
+ EventHandler changed = CanExecuteChanged;
+ if (changed != null)
+ changed(this, EventArgs.Empty);
+ }
+
+ void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName)
+ OnCanExecuteChanged();
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/NativeBindingExtensions.cs b/src/Controls/src/Core/Platform/Windows/NativeBindingExtensions.cs
new file mode 100644
index 000000000000..bd055420e86f
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/NativeBindingExtensions.cs
@@ -0,0 +1,55 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using Microsoft.UI.Xaml;
+using Microsoft.Maui.Controls.Internals;
+using static System.String;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public static class NativeBindingExtensions
+ {
+ // TODO MAUI
+ //public static void SetBinding(this FrameworkElement view, string propertyName, BindingBase bindingBase, string updateSourceEventName = null)
+ //{
+ // var binding = bindingBase as Binding;
+ // updateSourceEventName = updateSourceEventName ?? binding?.UpdateSourceEventName;
+
+ // if (IsNullOrEmpty(updateSourceEventName))
+ // {
+ // NativePropertyListener nativePropertyListener = null;
+ // if (bindingBase.Mode == BindingMode.TwoWay)
+ // nativePropertyListener = new NativePropertyListener(view, propertyName);
+
+ // NativeBindingHelpers.SetBinding(view, propertyName, bindingBase, nativePropertyListener as INotifyPropertyChanged);
+ // return;
+ // }
+
+ // NativeEventWrapper eventE = null;
+ // if (binding.Mode == BindingMode.TwoWay && !(view is INotifyPropertyChanged))
+ // eventE = new NativeEventWrapper(view, propertyName, updateSourceEventName);
+
+ // NativeBindingHelpers.SetBinding(view, propertyName, binding, eventE);
+ //}
+
+ public static void SetBinding(this FrameworkElement view, BindableProperty targetProperty, BindingBase binding)
+ {
+ NativeBindingHelpers.SetBinding(view, targetProperty, binding);
+ }
+
+ public static void SetValue(this FrameworkElement target, BindableProperty targetProperty, object value)
+ {
+ NativeBindingHelpers.SetValue(target, targetProperty, value);
+ }
+
+ public static void SetBindingContext(this FrameworkElement target, object bindingContext, Func> getChildren = null)
+ {
+ NativeBindingHelpers.SetBindingContext(target, bindingContext, getChildren);
+ }
+
+ internal static void TransferbindablePropertiesToWrapper(this FrameworkElement target, View wrapper)
+ {
+ NativeBindingHelpers.TransferBindablePropertiesToWrapper(target, wrapper);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/PageControl.cs b/src/Controls/src/Core/Platform/Windows/PageControl.cs
new file mode 100644
index 000000000000..2697b2f7114e
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/PageControl.cs
@@ -0,0 +1,183 @@
+using System.Threading.Tasks;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
+using WBrush = Microsoft.UI.Xaml.Media.Brush;
+using WImageSource = Microsoft.UI.Xaml.Media.ImageSource;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public sealed class PageControl : ContentControl, IToolbarProvider, ITitleViewRendererController
+ {
+ public static readonly DependencyProperty TitleVisibilityProperty = DependencyProperty.Register(nameof(TitleVisibility), typeof(Visibility), typeof(PageControl), new PropertyMetadata(Visibility.Visible));
+
+ public static readonly DependencyProperty ToolbarBackgroundProperty = DependencyProperty.Register(nameof(ToolbarBackground), typeof(WBrush), typeof(PageControl),
+ new PropertyMetadata(default(WBrush)));
+
+ public static readonly DependencyProperty BackButtonTitleProperty = DependencyProperty.Register("BackButtonTitle", typeof(string), typeof(PageControl), new PropertyMetadata(false));
+
+ public static readonly DependencyProperty ContentMarginProperty = DependencyProperty.Register("ContentMargin", typeof(Microsoft.UI.Xaml.Thickness), typeof(PageControl),
+ new PropertyMetadata(default(Microsoft.UI.Xaml.Thickness)));
+
+ public static readonly DependencyProperty TitleIconProperty = DependencyProperty.Register(nameof(TitleIcon), typeof(WImageSource), typeof(PageControl), new PropertyMetadata(default(WImageSource)));
+
+ public static readonly DependencyProperty TitleViewProperty = DependencyProperty.Register(nameof(TitleView), typeof(View), typeof(PageControl), new PropertyMetadata(default(View), OnTitleViewPropertyChanged));
+
+ public static readonly DependencyProperty TitleViewVisibilityProperty = DependencyProperty.Register(nameof(TitleViewVisibility), typeof(Visibility), typeof(PageControl), new PropertyMetadata(Visibility.Collapsed));
+
+ public static readonly DependencyProperty TitleInsetProperty = DependencyProperty.Register("TitleInset", typeof(double), typeof(PageControl), new PropertyMetadata(default(double)));
+
+ public static readonly DependencyProperty TitleBrushProperty = DependencyProperty.Register("TitleBrush", typeof(WBrush), typeof(PageControl), new PropertyMetadata(null));
+
+ CommandBar _commandBar;
+ FrameworkElement _titleViewPresenter;
+
+ ToolbarPlacement _toolbarPlacement;
+ bool _toolbarDynamicOverflowEnabled = true;
+ readonly ToolbarPlacementHelper _toolbarPlacementHelper = new ToolbarPlacementHelper();
+
+ public bool ShouldShowToolbar
+ {
+ get { return _toolbarPlacementHelper.ShouldShowToolBar; }
+ set { _toolbarPlacementHelper.ShouldShowToolBar = value; }
+ }
+
+ public WImageSource TitleIcon
+ {
+ get { return (WImageSource)GetValue(TitleIconProperty); }
+ set { SetValue(TitleIconProperty, value); }
+ }
+
+ public View TitleView
+ {
+ get { return (View)GetValue(TitleViewProperty); }
+ set { SetValue(TitleViewProperty, value); }
+ }
+
+ TaskCompletionSource _commandBarTcs;
+ Microsoft.UI.Xaml.Controls.ContentPresenter _presenter;
+ TitleViewManager _titleViewManager;
+
+ public PageControl()
+ {
+ Style = Microsoft.UI.Xaml.Application.Current.Resources["MauiControlsPageControlStyle"] as Microsoft.UI.Xaml.Style;
+ }
+
+ public string BackButtonTitle
+ {
+ get { return (string)GetValue(BackButtonTitleProperty); }
+ set { SetValue(BackButtonTitleProperty, value); }
+ }
+
+ public double ContentHeight
+ {
+ get { return _presenter != null ? _presenter.ActualHeight : 0; }
+ }
+
+ public Microsoft.UI.Xaml.Thickness ContentMargin
+ {
+ get { return (Microsoft.UI.Xaml.Thickness)GetValue(ContentMarginProperty); }
+ set { SetValue(ContentMarginProperty, value); }
+ }
+
+ public double ContentWidth
+ {
+ get { return _presenter != null ? _presenter.ActualWidth : 0; }
+ }
+
+ public WBrush ToolbarBackground
+ {
+ get { return (WBrush)GetValue(ToolbarBackgroundProperty); }
+ set { SetValue(ToolbarBackgroundProperty, value); }
+ }
+
+ public ToolbarPlacement ToolbarPlacement
+ {
+ get { return _toolbarPlacement; }
+ set
+ {
+ _toolbarPlacement = value;
+ _toolbarPlacementHelper.UpdateToolbarPlacement();
+ }
+ }
+
+ public bool ToolbarDynamicOverflowEnabled
+ {
+ get { return _toolbarDynamicOverflowEnabled; }
+ set
+ {
+ _toolbarDynamicOverflowEnabled = value;
+ UpdateToolbarDynamicOverflowEnabled();
+ }
+ }
+
+ public Visibility TitleVisibility
+ {
+ get { return (Visibility)GetValue(TitleVisibilityProperty); }
+ set { SetValue(TitleVisibilityProperty, value); }
+ }
+
+ public Visibility TitleViewVisibility
+ {
+ get { return (Visibility)GetValue(TitleViewVisibilityProperty); }
+ set { SetValue(TitleViewVisibilityProperty, value); }
+ }
+
+ public WBrush TitleBrush
+ {
+ get { return (WBrush)GetValue(TitleBrushProperty); }
+ set { SetValue(TitleBrushProperty, value); }
+ }
+
+ public double TitleInset
+ {
+ get { return (double)GetValue(TitleInsetProperty); }
+ set { SetValue(TitleInsetProperty, value); }
+ }
+
+ FrameworkElement ITitleViewRendererController.TitleViewPresenter => _titleViewPresenter;
+ CommandBar ITitleViewRendererController.CommandBar => _commandBar;
+
+ Task IToolbarProvider.GetCommandBarAsync()
+ {
+ if (_commandBar != null)
+ return Task.FromResult(_commandBar);
+
+ _commandBarTcs = new TaskCompletionSource();
+ ApplyTemplate();
+ return _commandBarTcs.Task;
+ }
+
+ protected override void OnApplyTemplate()
+ {
+ base.OnApplyTemplate();
+
+ _presenter = GetTemplateChild("presenter") as Microsoft.UI.Xaml.Controls.ContentPresenter;
+
+ _titleViewPresenter = GetTemplateChild("TitleViewPresenter") as FrameworkElement;
+
+ _commandBar = GetTemplateChild("CommandBar") as CommandBar;
+
+ _titleViewManager = new TitleViewManager(this);
+
+ _toolbarPlacementHelper.Initialize(_commandBar, () => ToolbarPlacement, GetTemplateChild);
+ UpdateToolbarDynamicOverflowEnabled();
+
+ TaskCompletionSource tcs = _commandBarTcs;
+ tcs?.SetResult(_commandBar);
+ }
+
+ static void OnTitleViewPropertyChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
+ {
+ ((PageControl)dependencyObject)._titleViewManager?.OnTitleViewPropertyChanged();
+ }
+
+ void UpdateToolbarDynamicOverflowEnabled()
+ {
+ if (_commandBar != null)
+ {
+ _commandBar.IsDynamicOverflowEnabled = ToolbarDynamicOverflowEnabled;
+ }
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/PlatformConfigurationExtensions.cs b/src/Controls/src/Core/Platform/Windows/PlatformConfigurationExtensions.cs
new file mode 100644
index 000000000000..9db9dc4a228a
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/PlatformConfigurationExtensions.cs
@@ -0,0 +1,11 @@
+namespace Microsoft.Maui.Controls.Platform
+{
+ public static class PlatformConfigurationExtensions
+ {
+ public static IPlatformElementConfiguration OnThisPlatform(this T element)
+ where T : Element, IElementConfiguration
+ {
+ return (element).On();
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/Styles/MauiControlsCommandBarStyle.xaml b/src/Controls/src/Core/Platform/Windows/Styles/MauiControlsCommandBarStyle.xaml
new file mode 100644
index 000000000000..e946dc7d503d
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Styles/MauiControlsCommandBarStyle.xaml
@@ -0,0 +1,890 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Controls/src/Core/Platform/Windows/Styles/MauiControlsPageControlStyle.xaml b/src/Controls/src/Core/Platform/Windows/Styles/MauiControlsPageControlStyle.xaml
new file mode 100644
index 000000000000..eb296b37cda9
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Styles/MauiControlsPageControlStyle.xaml
@@ -0,0 +1,54 @@
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/Styles/Resources.xaml b/src/Controls/src/Core/Platform/Windows/Styles/Resources.xaml
new file mode 100644
index 000000000000..f8ac786dcf7b
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/Styles/Resources.xaml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
diff --git a/src/Controls/src/Core/Platform/Windows/TitleViewManager.cs b/src/Controls/src/Core/Platform/Windows/TitleViewManager.cs
new file mode 100644
index 000000000000..472f3904e950
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/TitleViewManager.cs
@@ -0,0 +1,92 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal class TitleViewManager
+ {
+ readonly ITitleViewRendererController _titleViewRendererController;
+
+ View TitleView => _titleViewRendererController.TitleView;
+ CommandBar CommandBar => _titleViewRendererController.CommandBar;
+ FrameworkElement TitleViewPresenter => _titleViewRendererController.TitleViewPresenter;
+
+ public TitleViewManager(ITitleViewRendererController titleViewRendererController)
+ {
+ _titleViewRendererController = titleViewRendererController;
+
+ if (TitleViewPresenter != null)
+ {
+ TitleViewPresenter.Loaded += OnTitleViewPresenterLoaded;
+ }
+
+ if (CommandBar != null)
+ {
+ CommandBar.LayoutUpdated += commandLayoutUpdated;
+ CommandBar.Unloaded += commandBarUnloaded;
+ }
+ }
+
+ internal void OnTitleViewPropertyChanged()
+ {
+ UpdateTitleViewWidth();
+ }
+
+ void OnTitleViewPresenterLoaded(object sender, RoutedEventArgs e)
+ {
+ UpdateTitleViewWidth();
+ if (TitleViewPresenter != null)
+ {
+ TitleViewPresenter.Loaded -= OnTitleViewPresenterLoaded;
+ }
+ }
+
+ void commandBarUnloaded(object sender, RoutedEventArgs e)
+ {
+ if (CommandBar != null)
+ {
+ CommandBar.LayoutUpdated -= commandLayoutUpdated;
+ CommandBar.Unloaded -= commandBarUnloaded;
+ }
+ }
+
+ void commandLayoutUpdated(object sender, object e)
+ {
+ UpdateTitleViewWidth();
+ }
+
+ void UpdateTitleViewWidth()
+ {
+ if (TitleView == null || TitleViewPresenter == null || CommandBar == null)
+ return;
+
+ if (CommandBar.ActualWidth <= 0)
+ return;
+
+ double buttonWidth = 0;
+ foreach (var item in CommandBar.GetDescendantsByName("MoreButton"))
+ if (item.Visibility == Visibility.Visible)
+ buttonWidth += item.ActualWidth;
+
+ if (!CommandBar.IsDynamicOverflowEnabled)
+ foreach (var item in CommandBar.GetDescendantsByName("PrimaryItemsControl"))
+ buttonWidth += item.ActualWidth;
+
+ TitleViewPresenter.Width = CommandBar.ActualWidth - buttonWidth;
+ UpdateVisibility();
+ }
+
+ void UpdateVisibility()
+ {
+ if (TitleView == null)
+ _titleViewRendererController.TitleViewVisibility = Visibility.Collapsed;
+ else
+ _titleViewRendererController.TitleViewVisibility = Visibility.Visible;
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/ToolbarManager.cs b/src/Controls/src/Core/Platform/Windows/ToolbarManager.cs
new file mode 100644
index 000000000000..b8d346aade33
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ToolbarManager.cs
@@ -0,0 +1,102 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading.Tasks;
+using Microsoft.UI.Xaml.Controls;
+using WImage = Microsoft.UI.Xaml.Controls.Image;
+using NativeAutomationProperties = Microsoft.UI.Xaml.Automation.AutomationProperties;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ // TODO MAUI
+ // this needs to be fixed to handle multi page
+ static internal class ToolbarManager
+ {
+ static ToolbarTracker _toolbarTracker = new ToolbarTracker();
+ static ImageConverter _imageConverter = new ImageConverter();
+ static ImageSourceIconElementConverter _imageSourceIconElementConverter = new ImageSourceIconElementConverter();
+
+ static internal async Task UpdateToolbarItems(NavigationPage page)
+ {
+ _toolbarTracker.Target = page.CurrentPage;
+ var toolbarProvider = GetToolbarProvider(page);
+
+ if (toolbarProvider == null)
+ {
+ return;
+ }
+
+ var commandBar = await toolbarProvider.GetCommandBarAsync();
+
+ if (commandBar == null)
+ {
+ return;
+ }
+
+ commandBar.PrimaryCommands.Clear();
+ commandBar.SecondaryCommands.Clear();
+
+ var toolBarForegroundBinder = GetToolbarProvider(page) as IToolBarForegroundBinder;
+
+ foreach (ToolbarItem item in _toolbarTracker.ToolbarItems)
+ {
+ toolBarForegroundBinder?.BindForegroundColor(commandBar);
+
+ var button = new AppBarButton();
+ button.SetBinding(AppBarButton.LabelProperty, "Text");
+
+ if (commandBar.IsDynamicOverflowEnabled && item.Order == ToolbarItemOrder.Secondary)
+ {
+ button.SetBinding(AppBarButton.IconProperty, "IconImageSource", _imageSourceIconElementConverter);
+ }
+ else
+ {
+ var img = new WImage();
+ img.SetBinding(WImage.SourceProperty, "Value");
+ img.SetBinding(WImage.DataContextProperty, "IconImageSource", _imageConverter);
+ button.Content = img;
+ }
+
+ button.Command = new MenuItemCommand(item);
+ button.DataContext = item;
+ button.SetValue(NativeAutomationProperties.AutomationIdProperty, item.AutomationId);
+ button.SetAutomationPropertiesName(item);
+ button.SetAutomationPropertiesAccessibilityView(item);
+ button.SetAutomationPropertiesHelpText(item);
+
+ // TODO MAUI
+ button.SetAutomationPropertiesLabeledBy(item, null);
+
+ ToolbarItemOrder order = item.Order == ToolbarItemOrder.Default ? ToolbarItemOrder.Primary : item.Order;
+ if (order == ToolbarItemOrder.Primary)
+ {
+ toolBarForegroundBinder?.BindForegroundColor(button);
+ commandBar.PrimaryCommands.Add(button);
+ }
+ else
+ {
+ commandBar.SecondaryCommands.Add(button);
+ }
+ }
+ }
+
+ static internal IToolbarProvider GetToolbarProvider(Page page)
+ {
+ IToolbarProvider provider = null;
+
+ Page element = page;
+ while (element != null)
+ {
+ provider = element.Handler as IToolbarProvider;
+ if (provider != null)
+ break;
+
+ var pageContainer = element as IPageContainer;
+ element = pageContainer?.CurrentPage;
+ }
+
+ return provider;
+ }
+
+ }
+}
diff --git a/src/Controls/src/Core/Platform/Windows/ToolbarPlacementHelper.cs b/src/Controls/src/Core/Platform/Windows/ToolbarPlacementHelper.cs
new file mode 100644
index 000000000000..bfa5086fb26d
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ToolbarPlacementHelper.cs
@@ -0,0 +1,121 @@
+using System;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal class ToolbarPlacementHelper
+ {
+ Border _bottomCommandBarArea;
+ CommandBar _commandBar;
+ Func _getToolbarPlacement;
+ Border _titleArea;
+ Border _topCommandBarArea;
+
+ public void Initialize(CommandBar commandBar, Func getToolbarPlacement,
+ Func getTemplateChild)
+ {
+ _commandBar = commandBar;
+ _getToolbarPlacement = getToolbarPlacement;
+ _bottomCommandBarArea = getTemplateChild("BottomCommandBarArea") as Border;
+ _topCommandBarArea = getTemplateChild("TopCommandBarArea") as Border;
+ _titleArea = getTemplateChild("TitleArea") as Border;
+
+ if (_commandBar != null && _bottomCommandBarArea != null && _topCommandBarArea != null)
+ {
+ // We have to wait for the command bar to load so that it'll be in the control hierarchy
+ // otherwise we can't properly move it to wherever the toolbar is supposed to be
+ _commandBar.Loaded += (sender, args) =>
+ {
+ UpdateToolbarPlacement();
+ UpdateIsInValidLocation();
+ };
+ }
+ }
+
+ public void UpdateToolbarPlacement()
+ {
+ if (_commandBar == null || _getToolbarPlacement == null || _bottomCommandBarArea == null ||
+ _topCommandBarArea == null)
+ {
+ // Template hasn't been applied yet, so we're not ready to update the toolbar placement
+ return;
+ }
+
+ UpdateToolbarPlacement(_commandBar, _getToolbarPlacement(), _bottomCommandBarArea, _topCommandBarArea, _titleArea);
+ }
+
+ static void UpdateToolbarPlacement(CommandBar toolbar, ToolbarPlacement toolbarPlacement, Border bottomCommandBarArea,
+ Border topCommandBarArea, Border titleArea)
+ {
+ // Figure out what's hosting the command bar right now
+ var current = toolbar.Parent as Border;
+
+ // And figure out where it should be
+ Border target;
+
+ switch (toolbarPlacement)
+ {
+ case ToolbarPlacement.Top:
+ target = topCommandBarArea;
+ break;
+ case ToolbarPlacement.Bottom:
+ target = bottomCommandBarArea;
+ break;
+ case ToolbarPlacement.Default:
+ default:
+ target = Device.Idiom == TargetIdiom.Phone ? bottomCommandBarArea : topCommandBarArea;
+ break;
+ }
+
+ if (current == null || target == null || current == target)
+ {
+ return;
+ }
+
+ // Remove the command bar from its current host and add it to the new one
+ current.Child = null;
+ target.Child = toolbar;
+
+ if (titleArea != null)
+ {
+ if (target == bottomCommandBarArea)
+ {
+ // If the title is hosted in the command bar and we're moving the command bar to the bottom,
+ // put the title into the topCommandBarArea
+ toolbar.Content = null;
+ topCommandBarArea.Child = titleArea;
+ }
+ else
+ {
+ // Put the title back into the command bar
+ toolbar.Content = titleArea;
+ }
+ }
+ }
+
+ // For the time being, keeping this logic for dealing with consistency between the platforms
+ // re: toolbar visibility here; at some point we should be separating toolbars from navigation bars,
+ // and this won't be necessary
+ bool _shouldShowToolBar;
+ public bool ShouldShowToolBar
+ {
+ get { return _shouldShowToolBar; }
+ set
+ {
+ _shouldShowToolBar = value;
+ UpdateIsInValidLocation();
+ }
+ }
+
+ void UpdateIsInValidLocation()
+ {
+ var MauiCommandBar = _commandBar as MauiCommandBar;
+ if (MauiCommandBar != null)
+ {
+ MauiCommandBar.IsInValidLocation = ShouldShowToolBar;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/ToolbarTracker.cs b/src/Controls/src/Core/Platform/Windows/ToolbarTracker.cs
new file mode 100644
index 000000000000..e1866765aae6
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/ToolbarTracker.cs
@@ -0,0 +1,211 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Linq;
+using Microsoft.Maui.Controls.Internals;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ internal class ToolbarTracker
+ {
+ int _flyoutDetails;
+ Page _target;
+ ToolBarItemComparer _toolBarItemComparer;
+ public ToolbarTracker()
+ {
+ _toolBarItemComparer = new ToolBarItemComparer();
+ }
+
+ public IEnumerable AdditionalTargets { get; set; }
+
+ public bool HaveFlyoutPage
+ {
+ get { return _flyoutDetails > 0; }
+ }
+
+ public bool SeparateFlyoutPage { get; set; }
+
+
+ [Obsolete("MASTERDETAILPAGE")]
+ public bool HaveMasterDetail => SeparateFlyoutPage;
+
+ [Obsolete("MASTERDETAILPAGE")]
+ public bool SeparateMasterDetail
+ {
+ get => SeparateFlyoutPage;
+ set => SeparateFlyoutPage = value;
+ }
+
+ public Page Target
+ {
+ get { return _target; }
+ set
+ {
+ if (_target == value)
+ return;
+
+ UntrackTarget(_target);
+ _target = value;
+
+ if (_target != null)
+ TrackTarget(_target);
+ EmitCollectionChanged();
+ }
+ }
+
+ public IEnumerable ToolbarItems
+ {
+ get
+ {
+ if (Target == null)
+ return new ToolbarItem[0];
+
+ // I realize this is sorting on every single get but we don't have
+ // a mechanism in place currently to invalidate a stored version of this
+
+ List returnValue = GetCurrentToolbarItems(Target);
+
+ if (AdditionalTargets != null)
+ foreach (var item in AdditionalTargets)
+ foreach (var toolbarItem in item.ToolbarItems)
+ returnValue.Add(toolbarItem);
+
+ returnValue.Sort(_toolBarItemComparer);
+ return returnValue;
+ }
+ }
+
+ public event EventHandler CollectionChanged;
+
+ void EmitCollectionChanged()
+ => CollectionChanged?.Invoke(this, EventArgs.Empty);
+
+ List GetCurrentToolbarItems(Page page)
+ {
+ var result = new List();
+ result.AddRange(page.ToolbarItems);
+
+ if (page is FlyoutPage)
+ {
+ var flyoutDetail = (FlyoutPage)page;
+ if (SeparateFlyoutPage)
+ {
+ if (flyoutDetail.IsPresented)
+ {
+ if (flyoutDetail.Flyout != null)
+ result.AddRange(GetCurrentToolbarItems(flyoutDetail.Flyout));
+ }
+ else
+ {
+ if (flyoutDetail.Detail != null)
+ result.AddRange(GetCurrentToolbarItems(flyoutDetail.Detail));
+ }
+ }
+ else
+ {
+ if (flyoutDetail.Flyout != null)
+ result.AddRange(GetCurrentToolbarItems(flyoutDetail.Flyout));
+ if (flyoutDetail.Detail != null)
+ result.AddRange(GetCurrentToolbarItems(flyoutDetail.Detail));
+ }
+ }
+ else if (page is IPageContainer)
+ {
+ var container = (IPageContainer)page;
+ if (container.CurrentPage != null)
+ result.AddRange(GetCurrentToolbarItems(container.CurrentPage));
+ }
+
+ return result;
+ }
+
+ void OnChildAdded(object sender, ElementEventArgs eventArgs)
+ {
+ var page = eventArgs.Element as Page;
+ if (page == null)
+ return;
+
+ RegisterChildPage(page);
+ }
+
+ void OnChildRemoved(object sender, ElementEventArgs eventArgs)
+ {
+ var page = eventArgs.Element as Page;
+ if (page == null)
+ return;
+
+ UnregisterChildPage(page);
+ }
+
+ void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
+ {
+ EmitCollectionChanged();
+ }
+
+ void OnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
+ {
+ if (propertyChangedEventArgs.PropertyName == NavigationPage.CurrentPageProperty.PropertyName || propertyChangedEventArgs.PropertyName == FlyoutPage.IsPresentedProperty.PropertyName ||
+ propertyChangedEventArgs.PropertyName == "Detail" || propertyChangedEventArgs.PropertyName == "Flyout")
+ {
+ EmitCollectionChanged();
+ }
+ }
+
+ void RegisterChildPage(Page page)
+ {
+ if (page is FlyoutPage)
+ _flyoutDetails++;
+
+ ((ObservableCollection)page.ToolbarItems).CollectionChanged += OnCollectionChanged;
+ page.PropertyChanged += OnPropertyChanged;
+ }
+
+ void TrackTarget(Page page)
+ {
+ if (page == null)
+ return;
+
+ if (page is FlyoutPage)
+ _flyoutDetails++;
+
+ ((ObservableCollection)page.ToolbarItems).CollectionChanged += OnCollectionChanged;
+ page.Descendants().OfType().ForEach(RegisterChildPage);
+
+ page.DescendantAdded += OnChildAdded;
+ page.DescendantRemoved += OnChildRemoved;
+ page.PropertyChanged += OnPropertyChanged;
+ }
+
+ void UnregisterChildPage(Page page)
+ {
+ if (page is FlyoutPage)
+ _flyoutDetails--;
+
+ ((ObservableCollection)page.ToolbarItems).CollectionChanged -= OnCollectionChanged;
+ page.PropertyChanged -= OnPropertyChanged;
+ }
+
+ void UntrackTarget(Page page)
+ {
+ if (page == null)
+ return;
+
+ if (page is FlyoutPage)
+ _flyoutDetails--;
+
+ ((ObservableCollection)page.ToolbarItems).CollectionChanged -= OnCollectionChanged;
+ page.Descendants().OfType().ForEach(UnregisterChildPage);
+
+ page.DescendantAdded -= OnChildAdded;
+ page.DescendantRemoved -= OnChildRemoved;
+ page.PropertyChanged -= OnPropertyChanged;
+ }
+
+ class ToolBarItemComparer : IComparer
+ {
+ public int Compare(ToolbarItem x, ToolbarItem y) => x.Priority.CompareTo(y.Priority);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/src/Core/Platform/Windows/VisualElementTracker.cs b/src/Controls/src/Core/Platform/Windows/VisualElementTracker.cs
new file mode 100644
index 000000000000..e307a550e3ea
--- /dev/null
+++ b/src/Controls/src/Core/Platform/Windows/VisualElementTracker.cs
@@ -0,0 +1,905 @@
+#nullable enable
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Linq;
+using System.Threading.Tasks;
+using Windows.ApplicationModel.DataTransfer;
+using Windows.Graphics.Imaging;
+using Windows.Storage.Streams;
+using Microsoft.UI.Xaml;
+using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Hosting;
+using Microsoft.UI.Xaml.Input;
+using Microsoft.UI.Xaml.Media;
+using Microsoft.UI.Xaml.Media.Imaging;
+using Microsoft.Maui.Controls.Internals;
+using WCompositeTransform = Microsoft.UI.Xaml.Media.CompositeTransform;
+using WScaleTransform = Microsoft.UI.Xaml.Media.ScaleTransform;
+using Microsoft.Maui.Graphics;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ // TODO MAUI: can we convert this over to using IView
+ public class VisualElementTracker : IDisposable where TElement : VisualElement where TNativeElement : FrameworkElement
+ {
+ readonly NotifyCollectionChangedEventHandler _collectionChangedHandler;
+ readonly List _fingers = new List();
+ FrameworkElement? _container;
+ TNativeElement? _control;
+ TElement? _element;
+
+ bool _invalidateArrangeNeeded = false;
+
+ bool _isDisposed = false;
+ bool _isPanning = false;
+ bool _isSwiping = false;
+ bool _isPinching = false;
+ bool _wasPanGestureStartedSent = false;
+ bool _wasPinchGestureStartedSent = false;
+ public event EventHandler? Updated;
+
+ static bool HasClip;
+
+ public VisualElementTracker()
+ {
+ _collectionChangedHandler = ModelGestureRecognizersOnCollectionChanged;
+ }
+
+ public FrameworkElement? Container
+ {
+ get { return _container; }
+ set
+ {
+ if (_container == value)
+ return;
+
+ ClearContainerEventHandlers();
+
+ _container = value;
+
+ UpdatingGestureRecognizers();
+
+ UpdateNativeControl();
+ }
+ }
+
+ public bool PreventGestureBubbling { get; set; }
+
+ public TNativeElement? Control
+ {
+ get { return _control; }
+ set
+ {
+ if (_control == value)
+ return;
+
+ if (_control != null)
+ {
+ _control.Tapped -= HandleTapped;
+ _control.DoubleTapped -= HandleDoubleTapped;
+ }
+
+ _control = value;
+ UpdateNativeControl();
+
+ if (PreventGestureBubbling)
+ {
+ UpdatingGestureRecognizers();
+ }
+ }
+ }
+
+ void SendEventArgs(Action func)
+ {
+ if (_container == null && _control == null)
+ return;
+
+ var view = Element as View;
+ var gestures =
+ view?
+ .GestureRecognizers?
+ .OfType();
+
+ if (gestures == null)
+ return;
+
+ foreach (var gesture in gestures)
+ {
+ func(gesture);
+ }
+ }
+
+ void HandleDragLeave(object sender, Microsoft.UI.Xaml.DragEventArgs e)
+ {
+ var package = e.DataView.Properties["_XFPropertes_DONTUSE"] as DataPackage;
+ var dragEventArgs = new DragEventArgs(package);
+
+ dragEventArgs.AcceptedOperation = (DataPackageOperation)((int)dragEventArgs.AcceptedOperation);
+ SendEventArgs(rec =>
+ {
+ if (!rec.AllowDrop)
+ {
+ return;
+ }
+
+ var operationPriorToSend = dragEventArgs.AcceptedOperation;
+ rec.SendDragLeave(dragEventArgs);
+
+ // If you set the AcceptedOperation to a value it was already set to
+ // it causes the related animation to remain visible when the dragging component leaves
+ // for example
+ // e.AcceptedOperation = Windows.ApplicationModel.DataTransfer.DataPackageOperation.Copy;
+ // Even if AcceptedOperation is already set to Copy it will cause the copy animation
+ // to remain even after the the dragged element has left
+ if (operationPriorToSend != dragEventArgs.AcceptedOperation)
+ {
+ var result = (int)dragEventArgs.AcceptedOperation;
+ e.AcceptedOperation = (Windows.ApplicationModel.DataTransfer.DataPackageOperation)result;
+ }
+ });
+ }
+
+ void HandleDragOver(object sender, Microsoft.UI.Xaml.DragEventArgs e)
+ {
+ var package = e.DataView.Properties["_XFPropertes_DONTUSE"] as DataPackage;
+ var dragEventArgs = new DragEventArgs(package);
+
+ SendEventArgs(rec =>
+ {
+ if(!rec.AllowDrop)
+ {
+ e.AcceptedOperation = Windows.ApplicationModel.DataTransfer.DataPackageOperation.None;
+ return;
+ }
+
+ rec.SendDragOver(dragEventArgs);
+ var result = (int)dragEventArgs.AcceptedOperation;
+ e.AcceptedOperation = (Windows.ApplicationModel.DataTransfer.DataPackageOperation)result;
+ });
+ }
+
+ void HandleDropCompleted(UIElement sender, Microsoft.UI.Xaml.DropCompletedEventArgs e)
+ {
+ var args = new DropCompletedEventArgs();
+ SendEventArgs(rec => rec.SendDropCompleted(args));
+ }
+
+ void HandleDrop(object sender, Microsoft.UI.Xaml.DragEventArgs e)
+ {
+ var datapackage = e.DataView.Properties["_XFPropertes_DONTUSE"] as DataPackage;
+
+ var args = new DropEventArgs(datapackage?.View);
+ SendEventArgs(async rec =>
+ {
+ if (!rec.AllowDrop)
+ return;
+
+ try
+ {
+ await rec.SendDrop(args);
+ }
+ catch (Exception dropExc)
+ {
+ Internals.Log.Warning(nameof(DropGestureRecognizer), $"{dropExc}");
+ }
+ });
+ }
+
+ void HandleDragStarting(UIElement sender, Microsoft.UI.Xaml.DragStartingEventArgs e)
+ {
+ SendEventArgs(rec =>
+ {
+ if (!rec.CanDrag)
+ {
+ e.Cancel = true;
+ return;
+ }
+
+ var renderer = sender as IViewHandler;
+ var args = rec.SendDragStarting(renderer?.VirtualView);
+ e.Data.Properties["_XFPropertes_DONTUSE"] = args.Data;
+
+ if (!args.Handled && renderer != null)
+ {
+ if (renderer.NativeView is Microsoft.UI.Xaml.Controls.Image nativeImage &&
+ nativeImage.Source is BitmapImage bi && bi.UriSource != null)
+ {
+ e.Data.SetBitmap(RandomAccessStreamReference.CreateFromUri(bi.UriSource));
+ }
+ else if(!String.IsNullOrWhiteSpace(args.Data.Text))
+ {
+ Uri? uri;
+ if (Uri.TryCreate(args.Data.Text, UriKind.Absolute, out uri))
+ {
+ if (args.Data.Text.StartsWith("http", StringComparison.OrdinalIgnoreCase))
+ e.Data.SetWebLink(uri);
+ else
+ e.Data.SetApplicationLink(uri);
+ }
+ else
+ {
+ e.Data.SetText(args.Data.Text);
+ }
+ }
+ }
+
+ e.Cancel = args.Cancel;
+ e.AllowedOperations = Windows.ApplicationModel.DataTransfer.DataPackageOperation.Copy;
+ });
+ }
+
+ public TElement? Element
+ {
+ get { return _element; }
+ set
+ {
+ if (_element == value)
+ return;
+
+ if (_element != null)
+ {
+ _element.BatchCommitted -= OnRedrawNeeded;
+ _element.PropertyChanged -= OnPropertyChanged;
+
+ var view = _element as View;
+ if (view != null)
+ {
+ var oldRecognizers = (ObservableCollection)view.GestureRecognizers;
+ oldRecognizers.CollectionChanged -= _collectionChangedHandler;
+ var gestures = (view as IGestureController)?.CompositeGestureRecognizers as ObservableCollection;
+
+ if(gestures != null)
+ gestures.CollectionChanged -= _collectionChangedHandler;
+ }
+ }
+
+ _element = value;
+
+ if (_element != null)
+ {
+ _element.BatchCommitted += OnRedrawNeeded;
+ _element.PropertyChanged += OnPropertyChanged;
+
+ var view = _element as View;
+ if (view != null)
+ {
+ var newRecognizers = (ObservableCollection)view.GestureRecognizers;
+ newRecognizers.CollectionChanged += _collectionChangedHandler;
+
+ var gestures = (view as IGestureController)?.CompositeGestureRecognizers as ObservableCollection;
+ if (gestures != null)
+ gestures.CollectionChanged += _collectionChangedHandler;
+ }
+ }
+
+ UpdateNativeControl();
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ void ClearContainerEventHandlers()
+ {
+ if (_container != null)
+ {
+ _container.DragStarting -= HandleDragStarting;
+ _container.DropCompleted -= HandleDropCompleted;
+ _container.DragOver -= HandleDragOver;
+ _container.Drop -= HandleDrop;
+ _container.Tapped -= OnTap;
+ _container.DoubleTapped -= OnDoubleTap;
+ _container.ManipulationDelta -= OnManipulationDelta;
+ _container.ManipulationStarted -= OnManipulationStarted;
+ _container.ManipulationCompleted -= OnManipulationCompleted;
+ _container.PointerPressed -= OnPointerPressed;
+ _container.PointerExited -= OnPointerExited;
+ _container.PointerReleased -= OnPointerReleased;
+ _container.PointerCanceled -= OnPointerCanceled;
+ }
+ }
+
+ protected virtual void Dispose(bool disposing)
+ {
+ if (_isDisposed)
+ return;
+
+ _isDisposed = true;
+
+ if (!disposing)
+ return;
+
+ ClearContainerEventHandlers();
+
+ if (_element != null)
+ {
+ _element.BatchCommitted -= OnRedrawNeeded;
+ _element.PropertyChanged -= OnPropertyChanged;
+
+ var view = _element as View;
+ if (view != null)
+ {
+ var oldRecognizers = (ObservableCollection)view.GestureRecognizers;
+ oldRecognizers.CollectionChanged -= _collectionChangedHandler;
+ }
+ }
+
+ if (_control != null)
+ {
+ _control.Tapped -= HandleTapped;
+ _control.DoubleTapped -= HandleDoubleTapped;
+ }
+
+ Control = null;
+ Element = null;
+ Container = null;
+ }
+
+ protected virtual void OnPropertyChanged(object? sender, PropertyChangedEventArgs e)
+ {
+ if (Element == null)
+ return;
+
+ if (Element.Batched)
+ {
+ if (e.PropertyName == VisualElement.XProperty.PropertyName || e.PropertyName == VisualElement.YProperty.PropertyName || e.PropertyName == VisualElement.WidthProperty.PropertyName ||
+ e.PropertyName == VisualElement.HeightProperty.PropertyName)
+ {
+ _invalidateArrangeNeeded = true;
+ }
+ return;
+ }
+
+ if (Container == null)
+ return;
+
+ if (e.PropertyName == VisualElement.XProperty.PropertyName || e.PropertyName == VisualElement.YProperty.PropertyName || e.PropertyName == VisualElement.WidthProperty.PropertyName ||
+ e.PropertyName == VisualElement.HeightProperty.PropertyName)
+ {
+ MaybeInvalidate();
+ }
+
+
+ if (e.PropertyName == VisualElement.AnchorXProperty.PropertyName || e.PropertyName == VisualElement.AnchorYProperty.PropertyName)
+ {
+ UpdateScaleAndRotation(Element, Container);
+ }
+ else if (e.PropertyName == VisualElement.ScaleProperty.PropertyName || e.PropertyName == VisualElement.ScaleXProperty.PropertyName || e.PropertyName == VisualElement.ScaleYProperty.PropertyName)
+ {
+ UpdateScaleAndRotation(Element, Container);
+ }
+ else if (e.PropertyName == VisualElement.TranslationXProperty.PropertyName || e.PropertyName == VisualElement.TranslationYProperty.PropertyName ||
+ e.PropertyName == VisualElement.RotationProperty.PropertyName || e.PropertyName == VisualElement.RotationXProperty.PropertyName || e.PropertyName == VisualElement.RotationYProperty.PropertyName)
+ {
+ UpdateRotation(Element, Container);
+ }
+ else if (e.PropertyName == VisualElement.IsVisibleProperty.PropertyName)
+ {
+ UpdateVisibility(Element, Container);
+ }
+ else if (e.PropertyName == VisualElement.OpacityProperty.PropertyName)
+ {
+ UpdateOpacity(Element, Container);
+ }
+ else if (e.PropertyName == VisualElement.InputTransparentProperty.PropertyName)
+ {
+ UpdateInputTransparent(Element, Container);
+ }
+ else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName)
+ {
+ UpdateInputTransparent(Element, Container);
+ }
+ else if (e.PropertyName == VisualElement.ClipProperty.PropertyName)
+ {
+ UpdateClip(Element, Container);
+ }
+ }
+
+ protected virtual void UpdateNativeControl()
+ {
+ if (Element == null || Container == null)
+ return;
+
+ UpdateVisibility(Element, Container);
+ UpdateOpacity(Element, Container);
+ UpdateScaleAndRotation(Element, Container);
+ UpdateInputTransparent(Element, Container);
+ UpdateClip(Element, Container);
+
+ if (_invalidateArrangeNeeded)
+ {
+ MaybeInvalidate();
+ }
+ _invalidateArrangeNeeded = false;
+
+ OnUpdated();
+ }
+
+ void HandleSwipe(ManipulationDeltaRoutedEventArgs e, View view)
+ {
+ if (_fingers.Count > 1 || view == null)
+ return;
+
+ _isSwiping = true;
+
+ foreach (SwipeGestureRecognizer recognizer in view.GestureRecognizers.GetGesturesFor())
+ {
+ ((ISwipeGestureController)recognizer).SendSwipe(view, e.Delta.Translation.X + e.Cumulative.Translation.X, e.Delta.Translation.Y + e.Cumulative.Translation.Y);
+ }
+ }
+
+ void HandlePan(ManipulationDeltaRoutedEventArgs e, View view)
+ {
+ if (view == null)
+ return;
+
+ _isPanning = true;
+
+ foreach (PanGestureRecognizer recognizer in view.GestureRecognizers.GetGesturesFor().Where(g => g.TouchPoints == _fingers.Count))
+ {
+ if (!_wasPanGestureStartedSent)
+ {
+ recognizer.SendPanStarted(view, Application.Current.PanGestureId);
+ }
+ recognizer.SendPan(view, e.Delta.Translation.X + e.Cumulative.Translation.X, e.Delta.Translation.Y + e.Cumulative.Translation.Y, Application.Current.PanGestureId);
+ }
+ _wasPanGestureStartedSent = true;
+ }
+
+ void HandlePinch(ManipulationDeltaRoutedEventArgs e, View view)
+ {
+ if (_fingers.Count < 2 || view == null)
+ return;
+
+ _isPinching = true;
+
+ Windows.Foundation.Point translationPoint = e.Container.TransformToVisual(Container).TransformPoint(e.Position);
+
+ var scaleOriginPoint = new Point(translationPoint.X / view.Width, translationPoint.Y / view.Height);
+ IEnumerable pinchGestures = view.GestureRecognizers.GetGesturesFor();
+ foreach (PinchGestureRecognizer recognizer in pinchGestures)
+ {
+ if (!_wasPinchGestureStartedSent)
+ {
+ recognizer.SendPinchStarted(view, scaleOriginPoint);
+ }
+ recognizer.SendPinch(view, e.Delta.Scale, scaleOriginPoint);
+ }
+ _wasPinchGestureStartedSent = true;
+ }
+
+ void MaybeInvalidate()
+ {
+ if (Element?.IsInNativeLayout == true)
+ return;
+
+ var parent = (FrameworkElement?)Container?.Parent;
+ parent?.InvalidateMeasure();
+ Container?.InvalidateMeasure();
+ }
+
+ void ModelGestureRecognizersOnCollectionChanged(object? sender, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
+ {
+ UpdatingGestureRecognizers();
+ }
+
+ void OnDoubleTap(object sender, DoubleTappedRoutedEventArgs e)
+ {
+ var view = Element as View;
+ if (view == null)
+ return;
+
+ var tapPosition = e.GetPosition(Control);
+ var children = (view as IGestureController)?.GetChildElements(new Point(tapPosition.X, tapPosition.Y));
+
+ if (children != null)
+ foreach (var recognizer in children.GetChildGesturesFor(g => g.NumberOfTapsRequired == 1 || g.NumberOfTapsRequired == 2))
+ {
+ recognizer.SendTapped(view);
+ e.Handled = true;
+ }
+
+ if (e.Handled)
+ return;
+
+ IEnumerable doubleTapGestures = view.GestureRecognizers.GetGesturesFor(g => g.NumberOfTapsRequired == 1 || g.NumberOfTapsRequired == 2);
+ foreach (TapGestureRecognizer recognizer in doubleTapGestures)
+ {
+ recognizer.SendTapped(view);
+ e.Handled = true;
+ }
+ }
+
+ void OnManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
+ {
+ SwipeComplete(true);
+ PinchComplete(true);
+ PanComplete(true);
+ }
+
+ void OnManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
+ {
+ var view = Element as View;
+ if (view == null)
+ return;
+ HandleSwipe(e, view);
+ HandlePinch(e, view);
+ HandlePan(e, view);
+ }
+
+ void OnManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e)
+ {
+ var view = Element as View;
+ if (view == null)
+ return;
+ _wasPinchGestureStartedSent = false;
+ _wasPanGestureStartedSent = false;
+ }
+
+ void OnPointerCanceled(object sender, PointerRoutedEventArgs e)
+ {
+ uint id = e.Pointer.PointerId;
+ if (_fingers.Contains(id))
+ _fingers.Remove(id);
+ SwipeComplete(false);
+ PinchComplete(false);
+ PanComplete(false);
+ }
+
+ void OnPointerExited(object sender, PointerRoutedEventArgs e)
+ {
+ uint id = e.Pointer.PointerId;
+ if (_fingers.Contains(id))
+ _fingers.Remove(id);
+ SwipeComplete(true);
+ PinchComplete(true);
+ PanComplete(true);
+ }
+
+ void OnPointerPressed(object sender, PointerRoutedEventArgs e)
+ {
+ uint id = e.Pointer.PointerId;
+ if (!_fingers.Contains(id))
+ _fingers.Add(id);
+ }
+
+ void OnPointerReleased(object? sender, PointerRoutedEventArgs e)
+ {
+ uint id = e.Pointer.PointerId;
+ if (_fingers.Contains(id))
+ _fingers.Remove(id);
+ SwipeComplete(true);
+ PinchComplete(true);
+ PanComplete(true);
+ }
+
+ void OnRedrawNeeded(object? sender, EventArgs e)
+ {
+ UpdateNativeControl();
+ }
+
+ void OnTap(object? sender, TappedRoutedEventArgs e)
+ {
+ var view = Element as View;
+ if (view == null)
+ return;
+
+ var tapPosition = e.GetPosition(Control);
+ var children = (view as IGestureController)?.GetChildElements(new Point(tapPosition.X, tapPosition.Y));
+
+ if (children != null)
+ foreach (var recognizer in children.GetChildGesturesFor(g => g.NumberOfTapsRequired == 1))
+ {
+ recognizer.SendTapped(view);
+ e.Handled = true;
+ }
+
+ if (e.Handled)
+ return;
+
+ IEnumerable tapGestures = view.GestureRecognizers.GetGesturesFor(g => g.NumberOfTapsRequired == 1);
+ foreach (var recognizer in tapGestures)
+ {
+ recognizer.SendTapped(view);
+ e.Handled = true;
+ }
+ }
+
+ void SwipeComplete(bool success)
+ {
+ var view = Element as View;
+ if (view == null || !_isSwiping)
+ return;
+
+ if (success)
+ {
+ foreach (SwipeGestureRecognizer recognizer in view.GestureRecognizers.GetGesturesFor())
+ {
+ ((ISwipeGestureController)recognizer).DetectSwipe(view, recognizer.Direction);
+ }
+ }
+
+ _isSwiping = false;
+ }
+
+ void OnUpdated()
+ {
+ if (Updated != null)
+ Updated(this, EventArgs.Empty);
+ }
+
+ void PanComplete(bool success)
+ {
+ var view = Element as View;
+ if (view == null || !_isPanning)
+ return;
+
+ foreach (PanGestureRecognizer recognizer in view.GestureRecognizers.GetGesturesFor().Where(g => g.TouchPoints == _fingers.Count))
+ {
+ if (success)
+ {
+ recognizer.SendPanCompleted(view, Application.Current.PanGestureId);
+ }
+ else
+ {
+ recognizer.SendPanCanceled(view, Application.Current.PanGestureId);
+ }
+ }
+
+ Application.Current.PanGestureId++;
+ _isPanning = false;
+ }
+
+ void PinchComplete(bool success)
+ {
+ var view = Element as View;
+ if (view == null || !_isPinching)
+ return;
+
+ IEnumerable pinchGestures = view.GestureRecognizers.GetGesturesFor();
+ foreach (PinchGestureRecognizer recognizer in pinchGestures)
+ {
+ if (success)
+ {
+ recognizer.SendPinchEnded(view);
+ }
+ else
+ {
+ recognizer.SendPinchCanceled(view);
+ }
+ }
+
+ _isPinching = false;
+ }
+
+ static void UpdateInputTransparent(VisualElement view, FrameworkElement frameworkElement)
+ {
+ if (view is Layout)
+ {
+ // Let VisualElementRenderer handle this
+ }
+
+ frameworkElement.IsHitTestVisible = view.IsEnabled && !view.InputTransparent;
+ }
+
+ static void UpdateClip(VisualElement view, FrameworkElement frameworkElement)
+ {
+ if (!ShouldUpdateClip(view, frameworkElement))
+ return;
+
+ var geometry = view.Clip;
+
+ HasClip = geometry != null;
+
+ if (CompositionHelper.IsCompositionGeometryTypePresent)
+ frameworkElement.ClipVisual(geometry);
+ else
+ frameworkElement.Clip(geometry);
+ }
+
+ static bool ShouldUpdateClip(VisualElement view, FrameworkElement frameworkElement)
+ {
+ if (view == null || frameworkElement == null)
+ return false;
+
+ var formsGeometry = view.Clip;
+
+ if (formsGeometry != null)
+ return true;
+
+ if (formsGeometry == null && HasClip)
+ return true;
+
+ return false;
+ }
+
+ static void UpdateOpacity(VisualElement view, FrameworkElement frameworkElement)
+ {
+ frameworkElement.Opacity = view.Opacity;
+ }
+
+ static void UpdateRotation(VisualElement view, FrameworkElement frameworkElement)
+ {
+ double anchorX = view.AnchorX;
+ double anchorY = view.AnchorY;
+ double rotationX = view.RotationX;
+ double rotationY = view.RotationY;
+ double rotation = view.Rotation;
+ double translationX = view.TranslationX;
+ double translationY = view.TranslationY;
+ double scaleX = view.Scale * view.ScaleX;
+ double scaleY = view.Scale * view.ScaleY;
+
+ if (rotationX % 360 == 0 && rotationY % 360 == 0 && rotation % 360 == 0 && translationX == 0 && translationY == 0 && scaleX == 1 && scaleY == 1)
+ {
+ frameworkElement.Projection = null;
+ frameworkElement.RenderTransform = null;
+ }
+ else
+ {
+ // PlaneProjection removes touch and scrollwheel functionality on scrollable views such
+ // as ScrollView, ListView, and TableView. If neither RotationX or RotationY are set
+ // (i.e. their absolute value is 0), a CompositeTransform is instead used to allow for
+ // rotation of the control on a 2D plane, and the other values are set. Otherwise, the
+ // rotation values are set, but the aforementioned functionality will be lost.
+ if (Math.Abs(view.RotationX) != 0 || Math.Abs(view.RotationY) != 0)
+ {
+ frameworkElement.Projection = new PlaneProjection
+ {
+ CenterOfRotationX = anchorX,
+ CenterOfRotationY = anchorY,
+ GlobalOffsetX = translationX,
+ GlobalOffsetY = translationY,
+ RotationX = -rotationX,
+ RotationY = -rotationY,
+ RotationZ = -rotation
+ };
+ }
+ else
+ {
+ frameworkElement.RenderTransform = new WCompositeTransform
+ {
+ CenterX = anchorX,
+ CenterY = anchorY,
+ Rotation = rotation,
+ ScaleX = scaleX,
+ ScaleY = scaleY,
+ TranslateX = translationX,
+ TranslateY = translationY
+ };
+ }
+ }
+ }
+
+ static void UpdateScaleAndRotation(VisualElement view, FrameworkElement frameworkElement)
+ {
+ double anchorX = view.AnchorX;
+ double anchorY = view.AnchorY;
+ frameworkElement.RenderTransformOrigin = new Windows.Foundation.Point(anchorX, anchorY);
+ frameworkElement.RenderTransform = new WScaleTransform { ScaleX = view.Scale * view.ScaleX, ScaleY = view.Scale * view.ScaleY };
+
+ UpdateRotation(view, frameworkElement);
+ }
+
+ static void UpdateVisibility(VisualElement view, FrameworkElement frameworkElement)
+ {
+ frameworkElement.Visibility = view.IsVisible ? Visibility.Visible : Visibility.Collapsed;
+ }
+
+ void UpdateDragAndDropGestureRecognizers()
+ {
+ if (_container == null)
+ return;
+
+ var view = Element as View;
+ IList? gestures = view?.GestureRecognizers;
+
+ if (gestures == null)
+ return;
+
+ _container.CanDrag = gestures.GetGesturesFor()
+ .FirstOrDefault()?.CanDrag ?? false;
+
+ _container.AllowDrop = gestures.GetGesturesFor()
+ .FirstOrDefault()?.AllowDrop ?? false;
+
+ if (_container.CanDrag)
+ {
+ _container.DragStarting += HandleDragStarting;
+ _container.DropCompleted += HandleDropCompleted;
+ }
+
+ if(_container.AllowDrop)
+ {
+ _container.DragOver += HandleDragOver;
+ _container.Drop += HandleDrop;
+ _container.DragLeave += HandleDragLeave;
+ }
+ }
+
+ void UpdatingGestureRecognizers()
+ {
+ var view = Element as View;
+ IList? gestures = view?.GestureRecognizers;
+
+ if (_container == null || gestures == null)
+ return;
+
+ ClearContainerEventHandlers();
+ UpdateDragAndDropGestureRecognizers();
+
+ var children = (view as IGestureController)?.GetChildElements(Point.Zero);
+ IList? childGestures = children?.GetChildGesturesFor().ToList();
+
+ if (gestures.GetGesturesFor(g => g.NumberOfTapsRequired == 1).Any()
+ || children?.GetChildGesturesFor(g => g.NumberOfTapsRequired == 1).Any() == true)
+ {
+ _container.Tapped += OnTap;
+ }
+ else
+ {
+ if (_control != null && PreventGestureBubbling)
+ {
+ _control.Tapped += HandleTapped;
+ }
+ }
+
+ if (gestures.GetGesturesFor(g => g.NumberOfTapsRequired == 1 || g.NumberOfTapsRequired == 2).Any()
+ || children?.GetChildGesturesFor(g => g.NumberOfTapsRequired == 1 || g.NumberOfTapsRequired == 2).Any() == true)
+ {
+ _container.DoubleTapped += OnDoubleTap;
+ }
+ else
+ {
+ if (_control != null && PreventGestureBubbling)
+ {
+ _control.DoubleTapped += HandleDoubleTapped;
+ }
+ }
+
+ bool hasSwipeGesture = gestures.GetGesturesFor().GetEnumerator().MoveNext();
+ bool hasPinchGesture = gestures.GetGesturesFor().GetEnumerator().MoveNext();
+ bool hasPanGesture = gestures.GetGesturesFor().GetEnumerator().MoveNext();
+ if (!hasSwipeGesture && !hasPinchGesture && !hasPanGesture)
+ return;
+
+ //We can't handle ManipulationMode.Scale and System , so we don't support pinch/pan on a scrollview
+ if (Element is ScrollView)
+ {
+ if (hasPinchGesture)
+ Log.Warning("Gestures", "PinchGestureRecognizer is not supported on a ScrollView in Windows Platforms");
+ if (hasPanGesture)
+ Log.Warning("Gestures", "PanGestureRecognizer is not supported on a ScrollView in Windows Platforms");
+ if (hasSwipeGesture)
+ Log.Warning("Gestures", "SwipeGestureRecognizer is not supported on a ScrollView in Windows Platforms");
+ return;
+ }
+
+ _container.ManipulationMode = ManipulationModes.Scale | ManipulationModes.TranslateX | ManipulationModes.TranslateY;
+ _container.ManipulationDelta += OnManipulationDelta;
+ _container.ManipulationStarted += OnManipulationStarted;
+ _container.ManipulationCompleted += OnManipulationCompleted;
+ _container.PointerPressed += OnPointerPressed;
+ _container.PointerExited += OnPointerExited;
+ _container.PointerReleased += OnPointerReleased;
+ _container.PointerCanceled += OnPointerCanceled;
+ }
+
+ void HandleTapped(object sender, TappedRoutedEventArgs tappedRoutedEventArgs)
+ {
+ tappedRoutedEventArgs.Handled = true;
+ }
+
+ void HandleDoubleTapped(object sender, DoubleTappedRoutedEventArgs doubleTappedRoutedEventArgs)
+ {
+ doubleTappedRoutedEventArgs.Handled = true;
+ }
+ }
+}
diff --git a/src/Controls/src/Core/Platform/iOS/ControlsNavigationController.cs b/src/Controls/src/Core/Platform/iOS/ControlsNavigationController.cs
new file mode 100644
index 000000000000..53c8b45fcd65
--- /dev/null
+++ b/src/Controls/src/Core/Platform/iOS/ControlsNavigationController.cs
@@ -0,0 +1,242 @@
+//#nullable enable
+using System;
+using UIKit;
+using Microsoft.Maui.Controls.Handlers;
+using Foundation;
+using System.Threading.Tasks;
+using ObjCRuntime;
+using System.Collections.Generic;
+using Microsoft.Maui.Handlers;
+using System.Linq;
+using Microsoft.Maui.Controls.Internals;
+
+namespace Microsoft.Maui.Controls.Platform
+{
+ public class ControlsNavigationController : UINavigationController
+ {
+ readonly NavigationPageHandler _handler;
+ Dictionary> _completionTasks =
+ new Dictionary>();
+ TaskCompletionSource _popCompletionTask;
+
+ // This holds the view controllers for each page
+ readonly Dictionary _trackers =
+ new Dictionary();
+
+ IReadOnlyList NavigationStack => _handler.VirtualView.Navigation.NavigationStack;
+
+ public ControlsNavigationController(NavigationPageHandler handler) : base()
+ {
+ Delegate = new NavDelegate(this);
+ _handler = handler;
+ }
+
+ public ControlsNavigationController(NavigationPageHandler handler, Type navigationBarType, Type toolbarType)
+ : base(navigationBarType, toolbarType)
+ {
+ Delegate = new NavDelegate(this);
+ _handler = handler;
+ }
+
+ [Export("navigationBar:shouldPopItem:")]
+ [Microsoft.Maui.Controls.Internals.Preserve(Conditional = true)]
+ public bool ShouldPopItem(UINavigationBar navigationBar, UINavigationItem item) =>
+ SendPop();
+
+ internal bool SendPop()
+ {
+ // this means the pop is already done, nothing we can do
+ if (ViewControllers.Length < NavigationBar.Items.Length)
+ return true;
+
+ //foreach (var tracker in _trackers)
+ //{
+ // if (tracker.Value.ViewController == TopViewController)
+ // {
+ // var behavior = Shell.GetBackButtonBehavior(tracker.Value.Page);
+ // var command = behavior.GetPropertyIfSet(BackButtonBehavior.CommandProperty, null);
+ // var commandParameter = behavior.GetPropertyIfSet
$(NoWarn);CA1416
- $(DefineConstants);WINDOWS_UWP;WINDOWS
+ $(DefineConstants);WINDOWS
10.0.17763.0
win10-x86;win10-x64;win10-arm64
diff --git a/src/Controls/tests/Core.UnitTests/DragGestureRecognizerTests.cs b/src/Controls/tests/Core.UnitTests/DragGestureRecognizerTests.cs
index 9296595b41e8..0c5c79174076 100644
--- a/src/Controls/tests/Core.UnitTests/DragGestureRecognizerTests.cs
+++ b/src/Controls/tests/Core.UnitTests/DragGestureRecognizerTests.cs
@@ -134,7 +134,7 @@ public void TextPackageCorrectlyExtractedFromCompatibleElement(Type fieldType, s
var dragRec = new DragGestureRecognizer();
var element = (VisualElement)Activator.CreateInstance(fieldType);
Assert.IsTrue(element.TrySetValue(result));
- var args = dragRec.SendDragStarting(element);
+ var args = dragRec.SendDragStarting((IView)element);
Assert.AreEqual(result, args.Data.Text);
}
diff --git a/src/Core/src/Core.csproj b/src/Core/src/Core.csproj
index 6a8b0b942dde..4c757cb3caa3 100644
--- a/src/Core/src/Core.csproj
+++ b/src/Core/src/Core.csproj
@@ -1,6 +1,6 @@
- netstandard2.1;netstandard2.0;Xamarin.iOS10;MonoAndroid10.0
+ netstandard2.1;netstandard2.0;$(NonNet6Platforms)
Microsoft.Maui
Microsoft.Maui
enable
diff --git a/src/Core/src/Core/IPage.cs b/src/Core/src/Core/IPage.cs
index 25be3b70d5ed..209940fa97d9 100644
--- a/src/Core/src/Core/IPage.cs
+++ b/src/Core/src/Core/IPage.cs
@@ -9,5 +9,10 @@ public interface IPage : IView
/// Gets the view that contains the content of the Page.
///
public IView Content { get; }
+
+ ///
+ /// Gets the title of the Page.
+ ///
+ public string Title { get; }
}
}
\ No newline at end of file
diff --git a/src/Core/src/Core/IRadioButton.cs b/src/Core/src/Core/IRadioButton.cs
new file mode 100644
index 000000000000..61d5e3e470c1
--- /dev/null
+++ b/src/Core/src/Core/IRadioButton.cs
@@ -0,0 +1,15 @@
+using Microsoft.Maui.Graphics;
+
+namespace Microsoft.Maui
+{
+ ///
+ /// Represents a View that provides a toggled value.
+ ///
+ public interface IRadioButton : IView
+ {
+ ///
+ /// Gets or sets a Boolean value that indicates whether this RadioButton is checked.
+ ///
+ bool IsChecked { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/src/Core/src/Handlers/IViewHandler.cs b/src/Core/src/Handlers/IViewHandler.cs
index 043252d8c3a7..03593171386e 100644
--- a/src/Core/src/Handlers/IViewHandler.cs
+++ b/src/Core/src/Handlers/IViewHandler.cs
@@ -10,6 +10,7 @@ public interface IViewHandler
void DisconnectHandler();
object? NativeView { get; }
IView? VirtualView { get; }
+ IMauiContext? MauiContext { get; }
bool HasContainer { get; set; }
Size GetDesiredSize(double widthConstraint, double heightConstraint);
void SetFrame(Rectangle frame);
diff --git a/src/Core/src/Handlers/IViewHandler.iOS.cs b/src/Core/src/Handlers/IViewHandler.iOS.cs
index c24aefd133c1..cbfba9aac652 100644
--- a/src/Core/src/Handlers/IViewHandler.iOS.cs
+++ b/src/Core/src/Handlers/IViewHandler.iOS.cs
@@ -5,5 +5,6 @@ namespace Microsoft.Maui
public interface INativeViewHandler : IViewHandler
{
new UIView? NativeView { get; }
+ UIViewController? ViewController { get; }
}
}
\ No newline at end of file
diff --git a/src/Core/src/Handlers/Page/PageHandler.Android.cs b/src/Core/src/Handlers/Page/PageHandler.Android.cs
index 5ae29e2d1b88..d13adc9db02d 100644
--- a/src/Core/src/Handlers/Page/PageHandler.Android.cs
+++ b/src/Core/src/Handlers/Page/PageHandler.Android.cs
@@ -35,5 +35,9 @@ public override void SetVirtualView(IView view)
//var wrap = ViewGroup.LayoutParams.WrapContent;
NativeView.AddView(VirtualView.Content.ToNative(MauiContext)); // , new ViewGroup.LayoutParams(wrap, wrap));
}
+
+ public static void MapTitle(PageHandler handler, IPage page)
+ {
+ }
}
}
diff --git a/src/Core/src/Handlers/Page/PageHandler.Mac.cs b/src/Core/src/Handlers/Page/PageHandler.Mac.cs
index 86ca9de6d9d5..65c3ca94d546 100644
--- a/src/Core/src/Handlers/Page/PageHandler.Mac.cs
+++ b/src/Core/src/Handlers/Page/PageHandler.Mac.cs
@@ -10,5 +10,9 @@ protected override NSView CreateView()
{
return new NSView();
}
+
+ public static void MapTitle(PageHandler handler, IPage page)
+ {
+ }
}
}
diff --git a/src/Core/src/Handlers/Page/PageHandler.Standard.cs b/src/Core/src/Handlers/Page/PageHandler.Standard.cs
index 7395d88db589..14d06e3b9a3b 100644
--- a/src/Core/src/Handlers/Page/PageHandler.Standard.cs
+++ b/src/Core/src/Handlers/Page/PageHandler.Standard.cs
@@ -5,5 +5,9 @@ namespace Microsoft.Maui.Handlers
public partial class PageHandler : ViewHandler
{
protected override object CreateNativeView() => throw new NotImplementedException();
+
+ public static void MapTitle(PageHandler handler, IPage page)
+ {
+ }
}
}
diff --git a/src/Core/src/Handlers/Page/PageHandler.Windows.cs b/src/Core/src/Handlers/Page/PageHandler.Windows.cs
index 6a45ce7068a1..855795a7152f 100644
--- a/src/Core/src/Handlers/Page/PageHandler.Windows.cs
+++ b/src/Core/src/Handlers/Page/PageHandler.Windows.cs
@@ -36,5 +36,9 @@ protected override PagePanel CreateNativeView()
return view;
}
+
+ public static void MapTitle(PageHandler handler, IPage page)
+ {
+ }
}
}
diff --git a/src/Core/src/Handlers/Page/PageHandler.cs b/src/Core/src/Handlers/Page/PageHandler.cs
index 785bd1efd277..30da8a67915f 100644
--- a/src/Core/src/Handlers/Page/PageHandler.cs
+++ b/src/Core/src/Handlers/Page/PageHandler.cs
@@ -7,16 +7,17 @@ namespace Microsoft.Maui.Handlers
{
public partial class PageHandler : IViewHandler
{
- public static PropertyMapper LayoutMapper = new PropertyMapper(ViewHandler.ViewMapper)
+ public static PropertyMapper PageMapper = new PropertyMapper(ViewHandler.ViewMapper)
{
+ [nameof(IPage.Title)] = MapTitle,
};
- public PageHandler() : base(LayoutMapper)
+ public PageHandler() : base(PageMapper)
{
}
- public PageHandler(PropertyMapper? mapper = null) : base(mapper ?? LayoutMapper)
+ public PageHandler(PropertyMapper? mapper = null) : base(mapper ?? PageMapper)
{
}
diff --git a/src/Core/src/Handlers/Page/PageHandler.iOS.cs b/src/Core/src/Handlers/Page/PageHandler.iOS.cs
index c9c0596d4700..f7cd704ff39b 100644
--- a/src/Core/src/Handlers/Page/PageHandler.iOS.cs
+++ b/src/Core/src/Handlers/Page/PageHandler.iOS.cs
@@ -3,27 +3,29 @@
#if __IOS__ || IOS || MACCATALYST
using NativeView = UIKit.UIView;
+using UIKit;
#else
using NativeView = AppKit.NSView;
#endif
namespace Microsoft.Maui.Handlers
{
- public partial class PageHandler : ViewHandler
+ public partial class PageHandler : ViewHandler, INativeViewHandler
{
+ PageViewController? _pageViewController;
+ UIViewController? INativeViewHandler.ViewController => _pageViewController;
+
protected override PageView CreateNativeView()
{
- if (VirtualView == null)
- {
- throw new InvalidOperationException($"{nameof(VirtualView)} must be set to create a LayoutView");
- }
+ _ = VirtualView ?? throw new InvalidOperationException($"{nameof(VirtualView)} must be set to create a LayoutView");
+ _ = MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} cannot be null");
+
+ _pageViewController = new PageViewController(VirtualView, this.MauiContext);
- var view = new PageView
- {
- CrossPlatformArrange = VirtualView.Arrange,
- };
+ if (_pageViewController.CurrentNativeView is PageView pv)
+ return pv;
- return view;
+ throw new InvalidOperationException($"PageViewController.View must be a PageView");
}
public override void SetVirtualView(IView view)
@@ -41,5 +43,11 @@ public override void SetVirtualView(IView view)
NativeView.CrossPlatformArrange = VirtualView.Arrange;
NativeView.AddSubview(VirtualView.Content.ToNative(MauiContext));
}
+
+ public static void MapTitle(PageHandler handler, IPage page)
+ {
+ if(handler._pageViewController != null)
+ handler._pageViewController.Title = page.Title;
+ }
}
}
diff --git a/src/Core/src/Handlers/View/ViewHandlerOfT.MaciOS.cs b/src/Core/src/Handlers/View/ViewHandlerOfT.MaciOS.cs
index d29e1a11a304..22576bf68c27 100644
--- a/src/Core/src/Handlers/View/ViewHandlerOfT.MaciOS.cs
+++ b/src/Core/src/Handlers/View/ViewHandlerOfT.MaciOS.cs
@@ -12,6 +12,7 @@ namespace Microsoft.Maui.Handlers
public partial class ViewHandler : INativeViewHandler
{
UIView? INativeViewHandler.NativeView => (UIView?)base.NativeView;
+ UIViewController? INativeViewHandler.ViewController => null;
public override void SetFrame(Rectangle rect)
{
diff --git a/src/Core/src/Handlers/View/ViewHandlerOfT.cs b/src/Core/src/Handlers/View/ViewHandlerOfT.cs
index d034e4991d4b..18f823131fa7 100644
--- a/src/Core/src/Handlers/View/ViewHandlerOfT.cs
+++ b/src/Core/src/Handlers/View/ViewHandlerOfT.cs
@@ -119,6 +119,10 @@ protected virtual void SetupDefaults(TNativeView nativeView) { }
public abstract partial class ViewHandler : ViewHandler
where TVirtualView : class, IView
{
+ internal ViewHandler()
+ {
+ }
+
public new TVirtualView? VirtualView
{
get => (TVirtualView?)base.VirtualView;
diff --git a/src/Core/src/Hosting/AppHost.cs b/src/Core/src/Hosting/AppHost.cs
new file mode 100644
index 000000000000..13fc528975fb
--- /dev/null
+++ b/src/Core/src/Hosting/AppHost.cs
@@ -0,0 +1,19 @@
+#nullable enable
+
+namespace Microsoft.Maui.Hosting
+{
+ public static class AppHost
+ {
+ public static IAppHostBuilder CreateDefaultBuilder()
+ {
+ var builder = new AppHostBuilder();
+
+ builder.UseMauiServiceProviderFactory(false);
+
+ builder.UseMauiHandlers();
+ builder.ConfigureFonts();
+
+ return builder;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Core/src/Hosting/AppHostBuilder.cs b/src/Core/src/Hosting/AppHostBuilder.cs
index dce448c9967e..db05dccb2e46 100644
--- a/src/Core/src/Hosting/AppHostBuilder.cs
+++ b/src/Core/src/Hosting/AppHostBuilder.cs
@@ -37,18 +37,6 @@ public AppHostBuilder()
public IDictionary