Merge branch 'main' into dev/redth/provision-with-msbuild

This commit is contained in:
redth 2024-11-19 13:47:11 -05:00
Родитель f4470eacc1 fa519a2c9c
Коммит e4a57f396d
495 изменённых файлов: 5027 добавлений и 4235 удалений

Просмотреть файл

@ -24,7 +24,7 @@
"rollForward": false
},
"microsoft.dotnet.xharness.cli": {
"version": "10.0.0-prerelease.24524.9",
"version": "9.0.0-prerelease.24556.2",
"commands": [
"xharness"
],

3
.github/dependabot.yml поставляемый
Просмотреть файл

@ -46,6 +46,9 @@ updates:
patterns:
- "xunit"
- "xunit.runner.*"
SyncfusionToolkit:
patterns:
- "Syncfusion.Maui.Toolkit"
ignore:
- dependency-name: "MicrosoftMauiGraphicsVersion" # maestro
- dependency-name: "Microsoft.Maui.Graphics*" # maestro

Просмотреть файл

@ -13,10 +13,8 @@
<add key="skiasharp" value="https://pkgs.dev.azure.com/xamarin/public/_packaging/SkiaSharp/nuget/v3/index.json" />
<add key="dotnet-libraries" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries/nuget/v3/index.json" />
<add key="dotnet-libraries-transport" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-libraries-transport/nuget/v3/index.json" />
<!-- Added manually for .NET 8 MAUI -->-
<add key="darc-pub-dotnet-maui-a33a875e" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-maui-a33a875e/nuget/v3/index.json" />
</packageSources>
<add key="darc-pub-dotnet-maui-a33a875e" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-maui-a33a875e/nuget/v3/index.json" /></packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>

Просмотреть файл

@ -20,6 +20,7 @@
## Current News
* November 13, 2024 - [What's new in .NET MAUI for .NET 9](https://learn.microsoft.com/dotnet/maui/whats-new/dotnet-9)
* November 12, 2024 - [Announcing .NET 9](https://devblogs.microsoft.com/dotnet/announcing-dotnet-9/#.net-maui-–-enhancing-multi-platform-app-development)
* October 22, 2024 - [.NET MAUI Welcomes Syncfusion Open-source Contributions](https://devblogs.microsoft.com/dotnet/dotnet-maui-welcomes-syncfusion-open-source-contributions/)
Follow the [.NET MAUI Blog](https://devblogs.microsoft.com/dotnet/category/net-maui/) and visit the [News](https://github.com/dotnet/maui/wiki/News) wiki page for more news and updates.

Просмотреть файл

@ -1,50 +1,50 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="10.0.0-prerelease.24524.9">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="9.0.0-prerelease.24556.2">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>b12e9b940300433453aa7d57ff094aad50ce782c</Sha>
<Sha>e300b00d4b327b7025630285ee270a827d4d2677</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="10.0.0-prerelease.24524.9">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="9.0.0-prerelease.24556.2">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>b12e9b940300433453aa7d57ff094aad50ce782c</Sha>
<Sha>e300b00d4b327b7025630285ee270a827d4d2677</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="10.0.0-prerelease.24524.9">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="9.0.0-prerelease.24556.2">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>b12e9b940300433453aa7d57ff094aad50ce782c</Sha>
<Sha>e300b00d4b327b7025630285ee270a827d4d2677</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Feed" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Installers" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.Build.Tasks.Workloads" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.Helix.Sdk" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.SharedFramework.Sdk" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.RemoteExecutor" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24509.3">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="9.0.0-beta.24562.13">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>05c72bb3c9b38138276a8029017f2ef905dcc7fa</Sha>
<Sha>1c7e09a8d9c9c9b15ba574cd6a496553505559de</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>

Просмотреть файл

@ -125,22 +125,22 @@
<_HarfBuzzSharpVersion>7.3.0.2</_HarfBuzzSharpVersion>
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.7af1d0840a381c0ce7ef2877454a88dbb2949686.1086</_SkiaSharpNativeAssetsVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.120</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>10.0.0-prerelease.24524.9</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>10.0.0-prerelease.24524.9</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>10.0.0-prerelease.24524.9</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>9.0.0-prerelease.24556.2</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>9.0.0-prerelease.24556.2</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>9.0.0-prerelease.24556.2</MicrosoftDotNetXHarnessCLIVersion>
<TizenUIExtensionsVersion>0.9.2</TizenUIExtensionsVersion>
<SvgSkiaPackageVersion>1.0.0.16</SvgSkiaPackageVersion>
<FizzlerPackageVersion>1.3.0</FizzlerPackageVersion>
<TizenUIExtensionsVersion>0.9.0</TizenUIExtensionsVersion>
<ExCSSPackageVersion>4.2.3</ExCSSPackageVersion>
<SystemDrawingCommonPackageVersion>8.0.3</SystemDrawingCommonPackageVersion>
<MicrosoftDotNetBuildTasksFeedVersion>9.0.0-beta.24509.3</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24509.3</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>9.0.0-beta.24509.3</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetHelixSdkPackageVersion>9.0.0-beta.24509.3</MicrosoftDotNetHelixSdkPackageVersion>
<MicrosoftDotNetBuildTasksFeedVersion>9.0.0-beta.24562.13</MicrosoftDotNetBuildTasksFeedVersion>
<MicrosoftDotNetBuildTasksInstallersPackageVersion>9.0.0-beta.24562.13</MicrosoftDotNetBuildTasksInstallersPackageVersion>
<MicrosoftDotNetBuildTasksWorkloadsPackageVersion>9.0.0-beta.24562.13</MicrosoftDotNetBuildTasksWorkloadsPackageVersion>
<MicrosoftDotNetHelixSdkPackageVersion>9.0.0-beta.24562.13</MicrosoftDotNetHelixSdkPackageVersion>
<MicroBuildPluginsSwixBuildDotnetPackageVersion>1.1.87-gba258badda</MicroBuildPluginsSwixBuildDotnetPackageVersion>
<MicrosoftDotNetRemoteExecutorPackageVersion>9.0.0-beta.24509.3</MicrosoftDotNetRemoteExecutorPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>9.0.0-beta.24509.3</MicrosoftDotNetXUnitExtensionsPackageVersion>
<MicrosoftDotNetRemoteExecutorPackageVersion>9.0.0-beta.24562.13</MicrosoftDotNetRemoteExecutorPackageVersion>
<MicrosoftDotNetXUnitExtensionsPackageVersion>9.0.0-beta.24562.13</MicrosoftDotNetXUnitExtensionsPackageVersion>
</PropertyGroup>
<PropertyGroup>
<MicrosoftNETTestSdkPackageVersion>17.6.0</MicrosoftNETTestSdkPackageVersion>

Просмотреть файл

@ -31,7 +31,16 @@ steps:
# Calculate the expiration of the SAS token and convert to UTC
$expiry = (Get-Date).AddHours(${{ parameters.expiryInHours }}).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ")
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
# Temporarily work around a helix issue where SAS tokens with / in them will cause incorrect downloads
# of correlation payloads. https://github.com/dotnet/dnceng/issues/3484
$sas = ""
do {
$sas = az storage container generate-sas --account-name ${{ parameters.storageAccount }} --name ${{ parameters.container }} --permissions ${{ parameters.permissions }} --expiry $expiry --auth-mode login --as-user -o tsv
if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to generate SAS token."
exit 1
}
} while($sas.IndexOf('/') -ne -1)
if ($LASTEXITCODE -ne 0) {
Write-Error "Failed to generate SAS token."

Просмотреть файл

@ -59,7 +59,7 @@ jobs:
vmImage: $(POOL_VIMAGE)
demands:
- macOS.Name -equals Sonoma
- macOS.Architecture -equals x64
- macOS.Architecture -equals arm64
steps:
- ${{ each step in parameters.prepareSteps }}:

Просмотреть файл

@ -1,11 +1,11 @@
{
"tools": {
"dotnet": "9.0.100-rtm.24509.30"
"dotnet": "9.0.100"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44",
"Microsoft.Build.NoTargets": "3.7.0",
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24509.3"
"Microsoft.DotNet.Arcade.Sdk": "9.0.0-beta.24562.13"
},
"sdk": {
"allowPrerelease": true

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Obnoví balíčky NuGet vyžadované tímto projektem.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Spustit dotnet restore]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Umožňuje nakonfigurovat, jestli se mají přidat ukázkové stránky a funkce pro předvedení základních vzorů použití.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Zahrnout ukázkový obsah]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Je-li zadáno, přeskočí automatické obnovení projektu při vytvoření.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Stellt die NuGet-Pakete wieder her, die für dieses Projekt erforderlich sind.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[„dotnet restore“ ausführen]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Legt fest, ob Beispielseiten und -funktionen hinzugefügt werden sollen, um grundlegende Nutzungsmuster zu demonstrieren.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Include sample content]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Wenn angegeben, wird die automatische Wiederherstellung des Projekts beim Erstellen übersprungen.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Restaure los paquetes NuGet necesarios para este proyecto.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ejecutar "dotnet restore"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Configura si se van a agregar páginas de ejemplo y funcionalidades para mostrar patrones de uso básicos.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Incluir contenido de ejemplo]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Si se especifica, se omite la restauración automática del proyecto durante la creación.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Restaurer les packages NuGet requis par ce projet.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Exécutez « dotnet restore »]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Configure s'il faut ajouter des exemples de pages et de fonctionnalité pour illustrer les modèles d'utilisation de base.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Inclure un exemple de contenu]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Si spécifié, ignore la restauration automatique du projet lors de la création.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Ripristinare i pacchetti NuGet richiesti da questo progetto.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Esegui 'dotnet restore']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Consente di configurare se aggiungere pagine di esempio e funzionalità per mostrare modelli di utilizzo di base.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Include contenuto di esempio]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Se specificato, ignora il ripristino automatico del progetto durante la creazione.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[このプロジェクトに必要な NuGet パッケージを復元します。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['dotnet restore' を実行します]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[基本的な使用パターンを示すために、サンプル ページと機能を追加するかどうかを設定します。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_サンプル コンテンツを含める]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[指定した場合、作成時にプロジェクトの自動復元がスキップされます。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[이 프로젝트에 필요한 NuGet 패키지를 복원합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['dotnet restore' 실행]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[기본 사용 패턴을 보여 주는 샘플 페이지 및 기능을 추가할지 여부를 구성합니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_샘플 콘텐츠 포함]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[지정된 경우, 프로젝트 생성 시 자동 복원을 건너뜁니다.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Przywróć pakiety NuGet wymagane przez ten projekt.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Uruchom polecenie „dotnet restore”]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Konfiguruje, czy dodać przykładowe strony i funkcje, aby zademonstrować podstawowe wzorce użycia.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Dołącz przykładową zawartość]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Jeśli ta opcja jest określona, pomija automatyczne przywracanie projektu podczas tworzenia.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Restaurar os pacotes NuGet exigidos por esse projeto.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Execute 'dotnet restore']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Configura se deve adicionar páginas de amostra e funcionalidades para demonstrar padrões básicos de uso.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Incluir conteúdo de amostra]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Se especificado, ignora a restauração automática do projeto na criação.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Восстановление пакетов NuGet, необходимых для этого проекта.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Выполнить команду "dotnet restore"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Настраивает, следует ли добавлять примеры страниц и функции для демонстрации базовых шаблонов использования.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Включить пример содержимого]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Если указано, пропускает автоматическое восстановление проекта при создании.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Bu projenin gerektirdiği NuGet paketlerini geri yükleyin.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA['dotnet restore' çalıştır]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Temel kullanım desenlerini göstermek için örnek sayfaların ve işlevler eklenip eklenmeyeceğini belirler.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Örnek içeriği dahil et]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[Belirtilmişse, oluşturma anında projenin otomatik geri yüklenmesini atlar.]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[还原此项目所需的 NuGet 包。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[运行 "dotnet restore"]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[配置是否添加示例页和功能以演示基本使用模式。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[_Include 示例内容]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[如果指定,则在创建时跳过项目的自动还原。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -52,6 +52,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Restore NuGet packages required by this project.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[還原此專案所需的 NuGet 套件。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";postActions/restore/manualInstructions/default/text" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Run 'dotnet restore']]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[執行 'dotnet restore']]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/Framework/choices/DOTNET_TFM_VALUE/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Target DOTNET_TFM_VALUE]]></Val>
@ -70,6 +88,24 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Configures whether to add sample pages and functionality to demonstrate basic usage patterns.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[設定是否要新增範例頁面和功能,以示範基本使用模式。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/IncludeSampleContent/displayName" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[_Include sample content]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[包含範例內容(_I)]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/applicationId/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[Overrides the $(ApplicationId) in the project]]></Val>
@ -79,6 +115,15 @@
</Str>
<Disp Icon="Str" />
</Item>
<Item ItemId=";symbols/skipRestore/description" ItemType="0" PsrId="306" Leaf="true">
<Str Cat="Text">
<Val><![CDATA[If specified, skips the automatic restore of the project on create.]]></Val>
<Tgt Cat="Text" Stat="Loc" Orig="New">
<Val><![CDATA[如果指定,則會在建立時跳過專案的自動還原。]]></Val>
</Tgt>
</Str>
<Disp Icon="Str" />
</Item>
</Item>
</Item>
</LCX>

Просмотреть файл

@ -100,7 +100,7 @@ namespace BlazorWinFormsApp
if (!called)
{
//s MessageBox.Show(this, "Couldn't call TryDispatchAsync!");
//s MessageBox.Show(this, "Couldn't call TryDispatchAsync!");
}
}
}

Просмотреть файл

@ -74,7 +74,7 @@ namespace Microsoft.Maui.Controls.ControlGallery.GalleryPages
NavigationPage.SetBackButtonTitle(page, titleText);
changeTitleView_Clicked(this, EventArgs.Empty);
string result = (titleText == null) ? "<null>" : titleText;
string result = titleText ?? "<null>";
btnToggleBackButtonTitle.Text = $"Toggle Back Button Title Text: {result}";
}

Просмотреть файл

@ -10,9 +10,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2143, "Picker on windows phone", PlatformAffected.WinPhone)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue2143 : ContentPage
{
public Issue2143()

Просмотреть файл

@ -11,9 +11,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 22246, "Entry in Grid nested in ViewCell isn't expanding", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue22246Bz : ContentPage
{
public Issue22246Bz()

Просмотреть файл

@ -6,9 +6,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2615, "iOS Cell Reuse screws up when cells are both ViewCell with different children", PlatformAffected.iOS)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue2615 : ContentPage
{
public Issue2615()

Просмотреть файл

@ -13,9 +13,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 5555, "Memory leak when SwitchCell or EntryCell", PlatformAffected.iOS)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue5555 : TestContentPage
{
[Preserve(AllMembers = true)]

Просмотреть файл

@ -13,9 +13,9 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.Android.AppCompat
{
[System.Obsolete]
internal class FormsFragmentPagerAdapter<[DynamicallyAccessedMembers(BindableProperty.DeclaringTypeMembers
#if NET8_0 // IL2091
#if NET8_0 // IL2091
| BindableProperty.ReturnTypeMembers
#endif
#endif
)] T> : FragmentPagerAdapter where T : Page
{
MultiPage<T> _page;

Просмотреть файл

@ -52,7 +52,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Hosting
return handlersCollection;
}
public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, [DynamicallyAccessedMembers(Internals.HandlerType.TargetMembers)] TRenderer>(this IMauiHandlersCollection handlersCollection)
public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, [DynamicallyAccessedMembers(Internals.HandlerType.TargetMembers)] TRenderer>(this IMauiHandlersCollection handlersCollection)
where TControlType : IView
{
Internals.Registrar.CheckIfRendererIsCompatibilityRenderer(typeof(TRenderer));

Просмотреть файл

@ -9,46 +9,46 @@ namespace Microsoft.Maui.Controls.Core.UnitTests;
public class FrameUnitTests : BaseTestFixture
{
[Fact]
public void TestPackWithoutChild()
{
Frame frame = new Frame();
[Fact]
public void TestPackWithoutChild()
{
Frame frame = new Frame();
var parent = new NaiveLayout();
var parent = new NaiveLayout();
bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}
bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}
Assert.False(thrown);
}
Assert.False(thrown);
}
[Fact]
public void TestPackWithChild()
{
Frame frame = new Frame
{
Content = new View()
};
[Fact]
public void TestPackWithChild()
{
Frame frame = new Frame
{
Content = new View()
};
var parent = new NaiveLayout();
var parent = new NaiveLayout();
bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}
bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}
Assert.False(thrown);
}
Assert.False(thrown);
}
}

Просмотреть файл

@ -2,13 +2,13 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Maui.Controls.Core.UnitTests;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Controls.Core.UnitTests;
using Microsoft.Maui.UnitTests;
using NSubstitute;
using Xunit;
using Microsoft.Maui.UnitTests;
namespace Microsoft.Maui.Controls.Core.UnitTests
{

Просмотреть файл

@ -10,74 +10,74 @@ namespace Microsoft.Maui.Controls.Core.UnitTests;
public class ViewUnitTests : BaseTestFixture
{
[Fact]
public void BindingsApplyAfterViewAddedToParentWithContextSet()
{
var parent = new NaiveLayout();
parent.BindingContext = new MockViewModel { Text = "test" };
[Fact]
public void BindingsApplyAfterViewAddedToParentWithContextSet()
{
var parent = new NaiveLayout();
parent.BindingContext = new MockViewModel { Text = "test" };
var child = new Entry();
child.SetBinding(Entry.TextProperty, new Binding("Text"));
var child = new Entry();
child.SetBinding(Entry.TextProperty, new Binding("Text"));
parent.Children.Add(child);
parent.Children.Add(child);
Assert.Same(child.BindingContext, parent.BindingContext);
Assert.Equal("test", child.Text);
}
Assert.Same(child.BindingContext, parent.BindingContext);
Assert.Equal("test", child.Text);
}
[Fact]
public void TestBindingContextChaining()
{
View child;
var group = new NaiveLayout
{
Children = { (child = new View()) }
};
[Fact]
public void TestBindingContextChaining()
{
View child;
var group = new NaiveLayout
{
Children = { (child = new View()) }
};
var context = new object();
group.BindingContext = context;
var context = new object();
group.BindingContext = context;
Assert.Equal(context, child.BindingContext);
}
Assert.Equal(context, child.BindingContext);
}
[Fact]
public void TestAncestorRemoved()
{
var ancestor = new View();
var child = new NaiveLayout { Children = { ancestor } };
var view = new NaiveLayout { Children = { child } };
[Fact]
public void TestAncestorRemoved()
{
var ancestor = new View();
var child = new NaiveLayout { Children = { ancestor } };
var view = new NaiveLayout { Children = { child } };
bool removed = false;
view.DescendantRemoved += (sender, arg) => removed = true;
bool removed = false;
view.DescendantRemoved += (sender, arg) => removed = true;
child.Children.Remove(ancestor);
Assert.True(removed, "AncestorRemoved must fire when removing a child from an ancestor of a view.");
}
child.Children.Remove(ancestor);
Assert.True(removed, "AncestorRemoved must fire when removing a child from an ancestor of a view.");
}
[Fact]
public void TestDoubleSetParent()
{
var view = new ParentSignalView();
var parent = new NaiveLayout { Children = { view } };
[Fact]
public void TestDoubleSetParent()
{
var view = new ParentSignalView();
var parent = new NaiveLayout { Children = { view } };
view.ParentSet = false;
view.Parent = parent;
view.ParentSet = false;
view.Parent = parent;
Assert.False(view.ParentSet, "OnParentSet should not be called in the event the parent is already properly set");
}
Assert.False(view.ParentSet, "OnParentSet should not be called in the event the parent is already properly set");
}
[Fact]
public void TestAncestorAdded()
{
var child = new NaiveLayout();
var view = new NaiveLayout { Children = { child } };
[Fact]
public void TestAncestorAdded()
{
var child = new NaiveLayout();
var view = new NaiveLayout { Children = { child } };
bool added = false;
view.DescendantAdded += (sender, arg) => added = true;
bool added = false;
view.DescendantAdded += (sender, arg) => added = true;
child.Children.Add(new View());
child.Children.Add(new View());
Assert.True(added, "AncestorAdded must fire when adding a child to an ancestor of a view.");
Assert.True(added, "AncestorAdded must fire when adding a child to an ancestor of a view.");
}
class ParentSignalView : View

Просмотреть файл

@ -89,7 +89,7 @@ namespace Microsoft.Maui.Controls.Maps
{
return Geopath.GetEnumerator();
}
/// <summary>
/// Gets the index of a specified location object.
/// </summary>

Просмотреть файл

@ -1,10 +1,10 @@
using Android.Runtime;
using Android.Views;
using AndroidX.Navigation.Fragment;
using static Android.Views.ViewGroup.LayoutParams;
using Button = Android.Widget.Button;
using Fragment = AndroidX.Fragment.App.Fragment;
using View = Android.Views.View;
using static Android.Views.ViewGroup.LayoutParams;
namespace Maui.Controls.Sample.Droid;

Просмотреть файл

@ -3,4 +3,4 @@ using Maui.Controls.Sample.MacCatalyst;
// This is the main entry point of the application.
// If you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));
UIApplication.Main(args, null, typeof(AppDelegate));

Просмотреть файл

@ -85,7 +85,7 @@ public class MainViewController : UIViewController
UIBarButtonSystemItem.Add,
(sender, e) => RequestSession("NewTaskWindow"));
NavigationItem.RightBarButtonItems = [ addNewTaskButton, addNewWindowButton ];
NavigationItem.RightBarButtonItems = [addNewTaskButton, addNewWindowButton];
}
private void RequestSession(string? activityType = null)
@ -128,7 +128,7 @@ public class MainViewController : UIViewController
public override void LayoutSubviews()
{
if (Subviews?.FirstOrDefault() is {} view)
if (Subviews?.FirstOrDefault() is { } view)
view.Frame = Bounds;
}

Просмотреть файл

@ -39,8 +39,8 @@ public class NewTaskSceneDelegate : UIWindowSceneDelegate
return;
var toolbar = new NSToolbar();
#pragma warning disable CA1422
#pragma warning disable CA1422
toolbar.ShowsBaselineSeparator = false;
#pragma warning restore CA1422

Просмотреть файл

@ -3,4 +3,4 @@
// This is the main entry point of the application.
// If you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));
UIApplication.Main(args, null, typeof(AppDelegate));

Просмотреть файл

@ -129,7 +129,7 @@ public class MainViewController : UIViewController
public override void LayoutSubviews()
{
if (Subviews?.FirstOrDefault() is {} view)
if (Subviews?.FirstOrDefault() is { } view)
view.Frame = Bounds;
}

Просмотреть файл

@ -60,7 +60,7 @@ namespace Maui.Controls.Sample
if (UseCollectionView2)
{
#if IOS || MACCATALYST
appBuilder.ConfigureMauiHandlers(handlers =>
{
handlers.AddHandler<Microsoft.Maui.Controls.CollectionView, Microsoft.Maui.Controls.Handlers.Items2.CollectionViewHandler2>();

Просмотреть файл

@ -37,7 +37,7 @@ namespace Maui.Controls.Sample.Pages
windowNumber = Math.Min(windowNumber, windows.Count);
windowNumber = Math.Max(1, windowNumber);
int windowIndex = windowNumber - 1;
Window windowToActivate = windows[windowIndex];

Просмотреть файл

@ -80,7 +80,7 @@ namespace Maui.Controls.Sample.Pages.ShellGalleries
{
AppShell!.FlyoutIsPresented = !AppShell!.FlyoutIsPresented;
}
void OnToggleFlyoutBackgroundColor(object sender, EventArgs e)
{
AppShell!.RemoveBinding(Shell.FlyoutBackgroundProperty);

Просмотреть файл

@ -99,7 +99,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
public static BuildExceptionCode ResourceDictMissingKey = new BuildExceptionCode("XC", 0126, nameof(ResourceDictMissingKey), "");
public static BuildExceptionCode XKeyNotLiteral = new BuildExceptionCode("XC", 0127, nameof(XKeyNotLiteral), "");
public static BuildExceptionCode StaticResourceSyntax = new BuildExceptionCode("XC", 0128, nameof(StaticResourceSyntax), "");
//CSC equivalents
public static BuildExceptionCode ObsoleteProperty = new BuildExceptionCode("XC", 0618, nameof(ObsoleteProperty), ""); //warning

Просмотреть файл

@ -9,13 +9,13 @@ using static Mono.Cecil.Cil.OpCodes;
namespace Microsoft.Maui.Controls.Build.Tasks
{
//yes, this is a ICompiledMarkupExtension, but declared as ICompiledValueProvider so it's evaluated later (in SetPropertyValue, not CreateObject)
//yes, this is a ICompiledMarkupExtension, but declared as ICompiledValueProvider so it's evaluated later (in SetPropertyValue, not CreateObject)
class StaticResourceExtension : ICompiledValueProvider
{
public IEnumerable<Instruction> ProvideValue(VariableDefinitionReference vardefref, ModuleDefinition module, BaseNode node, ILContext context)
public IEnumerable<Instruction> ProvideValue(VariableDefinitionReference vardefref, ModuleDefinition module, BaseNode node, ILContext context)
{
var name = new XmlName("", "Key");
var eNode = node as ElementNode;
var eNode = node as ElementNode;
if (!eNode.Properties.TryGetValue(name, out INode keyNode) && eNode.CollectionItems.Any())
keyNode = eNode.CollectionItems[0];
@ -23,165 +23,172 @@ namespace Microsoft.Maui.Controls.Build.Tasks
if (!(keyNode is ValueNode keyValueNode))
throw new BuildException(BuildExceptionCode.StaticResourceSyntax, eNode as IXmlLineInfo, null, null);
var n = eNode;
while (n != null)
{
if (n.Properties.TryGetValue(new XmlName(XamlParser.MauiUri, "Resources"), out var resourcesNode))
{
//single resource in <Resources>
if (resourcesNode is IElementNode irn
&& irn.Properties.TryGetValue(XmlName.xKey, out INode xKeyNode)
&& context.Variables.ContainsKey(irn)
&& xKeyNode is ValueNode xKeyValueNode
&& xKeyValueNode.Value as string == keyValueNode.Value as string)
{
if (context.Variables[resourcesNode as IElementNode].VariableType.FullName == "System.String") {
foreach (var instruction in TryConvert(irn.CollectionItems[0] as ValueNode, eNode, vardefref, module, context))
yield return instruction;
yield break;
}
var n = eNode;
while (n != null)
{
if (n.Properties.TryGetValue(new XmlName(XamlParser.MauiUri, "Resources"), out var resourcesNode))
{
//single resource in <Resources>
if (resourcesNode is IElementNode irn
&& irn.Properties.TryGetValue(XmlName.xKey, out INode xKeyNode)
&& context.Variables.ContainsKey(irn)
&& xKeyNode is ValueNode xKeyValueNode
&& xKeyValueNode.Value as string == keyValueNode.Value as string)
{
if (context.Variables[resourcesNode as IElementNode].VariableType.FullName == "System.String")
{
foreach (var instruction in TryConvert(irn.CollectionItems[0] as ValueNode, eNode, vardefref, module, context))
yield return instruction;
yield break;
}
vardefref.VariableDefinition = context.Variables[irn];
yield break;
}
//multiple resources in <Resources>
else if (resourcesNode is ListNode lr) {
foreach (var rn in lr.CollectionItems) {
if (rn is IElementNode irn2
&& irn2.Properties.TryGetValue(XmlName.xKey, out INode xKeyNode2)
&& context.Variables.ContainsKey(irn2)
&& xKeyNode2 is ValueNode xKeyValueNode2
&& xKeyValueNode2.Value as string == keyValueNode.Value as string)
{
if (irn2.CollectionItems.Count == 1 && irn2.CollectionItems[0] is ValueNode vn2 && vn2.Value is string) {
foreach (var instruction in TryConvert(vn2, eNode, vardefref, module, context))
yield return instruction;
yield break;
}
vardefref.VariableDefinition = context.Variables[irn];
yield break;
}
//multiple resources in <Resources>
else if (resourcesNode is ListNode lr)
{
foreach (var rn in lr.CollectionItems)
{
if (rn is IElementNode irn2
&& irn2.Properties.TryGetValue(XmlName.xKey, out INode xKeyNode2)
&& context.Variables.ContainsKey(irn2)
&& xKeyNode2 is ValueNode xKeyValueNode2
&& xKeyValueNode2.Value as string == keyValueNode.Value as string)
{
if (irn2.CollectionItems.Count == 1 && irn2.CollectionItems[0] is ValueNode vn2 && vn2.Value is string)
{
foreach (var instruction in TryConvert(vn2, eNode, vardefref, module, context))
yield return instruction;
yield break;
}
vardefref.VariableDefinition = context.Variables[irn2];
yield break;
}
}
}
//explicit ResourceDictionary in Resources
else if (resourcesNode is IElementNode resourceDictionary
&& resourceDictionary.XmlType.Name == "ResourceDictionary") {
foreach (var rn in resourceDictionary.CollectionItems) {
if (rn is IElementNode irn3
&& irn3.Properties.TryGetValue(XmlName.xKey, out INode xKeyNode3)
&& irn3.XmlType.Name != "OnPlatform"
&& context.Variables.ContainsKey(irn3)
&& xKeyNode3 is ValueNode xKeyValueNode3
&& xKeyValueNode3.Value as string == keyValueNode.Value as string)
{
if (irn3.CollectionItems.Count == 1 && irn3.CollectionItems[0] is ValueNode vn3 && vn3.Value is string) {
foreach (var instruction in TryConvert(vn3, eNode, vardefref, module, context))
yield return instruction;
yield break;
}
vardefref.VariableDefinition = context.Variables[irn2];
yield break;
}
}
}
//explicit ResourceDictionary in Resources
else if (resourcesNode is IElementNode resourceDictionary
&& resourceDictionary.XmlType.Name == "ResourceDictionary")
{
foreach (var rn in resourceDictionary.CollectionItems)
{
if (rn is IElementNode irn3
&& irn3.Properties.TryGetValue(XmlName.xKey, out INode xKeyNode3)
&& irn3.XmlType.Name != "OnPlatform"
&& context.Variables.ContainsKey(irn3)
&& xKeyNode3 is ValueNode xKeyValueNode3
&& xKeyValueNode3.Value as string == keyValueNode.Value as string)
{
if (irn3.CollectionItems.Count == 1 && irn3.CollectionItems[0] is ValueNode vn3 && vn3.Value is string)
{
foreach (var instruction in TryConvert(vn3, eNode, vardefref, module, context))
yield return instruction;
yield break;
}
vardefref.VariableDefinition = context.Variables[irn3];
yield break;
}
}
}
}
n = n.Parent as ElementNode;
}
vardefref.VariableDefinition = context.Variables[irn3];
yield break;
}
}
}
}
//Fallback
foreach (var instruction in FallBack(keyValueNode.Value as string, eNode, module, context).ToList())
yield return instruction;
n = n.Parent as ElementNode;
}
var vardef = new VariableDefinition(module.TypeSystem.Object);
//Fallback
foreach (var instruction in FallBack(keyValueNode.Value as string, eNode, module, context).ToList())
yield return instruction;
var vardef = new VariableDefinition(module.TypeSystem.Object);
yield return Create(Stloc, vardef);
vardefref.VariableDefinition = vardef;
}
}
public static IEnumerable<Instruction> TryConvert(ValueNode stringResourceNode, IElementNode node, VariableDefinitionReference vardefref, ModuleDefinition module, ILContext context)
{
XmlName propertyName = XmlName.Empty;
SetPropertiesVisitor.TryGetPropertyName(node, node.Parent, out propertyName);
var localName = propertyName.LocalName;
var parentType = module.ImportReference((node.Parent as IElementNode).XmlType.GetTypeReference(context.Cache, module, (IXmlLineInfo)node));
public static IEnumerable<Instruction> TryConvert(ValueNode stringResourceNode, IElementNode node, VariableDefinitionReference vardefref, ModuleDefinition module, ILContext context)
{
XmlName propertyName = XmlName.Empty;
SetPropertiesVisitor.TryGetPropertyName(node, node.Parent, out propertyName);
var localName = propertyName.LocalName;
var parentType = module.ImportReference((node.Parent as IElementNode).XmlType.GetTypeReference(context.Cache, module, (IXmlLineInfo)node));
var bpRef = SetPropertiesVisitor.GetBindablePropertyReference(parentType, propertyName.NamespaceURI, ref localName, out _, context, (IXmlLineInfo)node);
//BindableProperty
if (bpRef != null)
{
var targetTypeRef = module.ImportReference(bpRef.GetBindablePropertyType(context.Cache, node as IXmlLineInfo, module));
var bpRef = SetPropertiesVisitor.GetBindablePropertyReference(parentType, propertyName.NamespaceURI, ref localName, out _, context, (IXmlLineInfo)node);
//BindableProperty
if (bpRef != null)
{
var targetTypeRef = module.ImportReference(bpRef.GetBindablePropertyType(context.Cache, node as IXmlLineInfo, module));
foreach (var instruction in stringResourceNode.PushConvertedValue(context, bpRef, requiredServices => stringResourceNode.PushServiceProvider(context, requiredServices, bpRef: bpRef), true, false))
yield return instruction;
var vardef = new VariableDefinition(targetTypeRef);
yield return Create(Stloc, vardef);
vardefref.VariableDefinition = vardef;
yield break;
}
var propertyRef = parentType.GetProperty(context.Cache, pd => pd.Name == localName, out var declaringTypeReference);
if (propertyRef != null)
{
var propertyType = propertyRef.PropertyType.ResolveGenericParameters(declaringTypeReference);
var vardef = new VariableDefinition(targetTypeRef);
yield return Create(Stloc, vardef);
vardefref.VariableDefinition = vardef;
yield break;
}
foreach (var instruction in stringResourceNode.PushConvertedValue(
context,
propertyType,
[propertyRef, propertyType.ResolveCached(context.Cache)],
requiredServices => stringResourceNode.PushServiceProvider(context, requiredServices, propertyRef: propertyRef),
boxValueTypes: true,
unboxValueTypes: false))
var propertyRef = parentType.GetProperty(context.Cache, pd => pd.Name == localName, out var declaringTypeReference);
if (propertyRef != null)
{
var propertyType = propertyRef.PropertyType.ResolveGenericParameters(declaringTypeReference);
foreach (var instruction in stringResourceNode.PushConvertedValue(
context,
propertyType,
[propertyRef, propertyType.ResolveCached(context.Cache)],
requiredServices => stringResourceNode.PushServiceProvider(context, requiredServices, propertyRef: propertyRef),
boxValueTypes: true,
unboxValueTypes: false))
yield return instruction;
var vardef = new VariableDefinition(propertyType);
yield return Create(Stloc, vardef);
vardefref.VariableDefinition = vardef;
yield break;
}
}
var vardef = new VariableDefinition(propertyType);
yield return Create(Stloc, vardef);
vardefref.VariableDefinition = vardef;
yield break;
}
}
public static IEnumerable<Instruction> FallBack(string key, IElementNode node, ModuleDefinition module, ILContext context)
{
var staticResourceExtensionType = module.ImportReference(context.Cache,
("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml", "StaticResourceExtension"));
yield return Create(Newobj, module.ImportCtorReference(context.Cache,
staticResourceExtensionType,
paramCount: 0));
SetPropertiesVisitor.TryGetPropertyName(node, node.Parent, out var propertyName);
var localName = propertyName.LocalName;
public static IEnumerable<Instruction> FallBack(string key, IElementNode node, ModuleDefinition module, ILContext context)
{
var staticResourceExtensionType = module.ImportReference(context.Cache,
("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml", "StaticResourceExtension"));
yield return Create(Newobj, module.ImportCtorReference(context.Cache,
staticResourceExtensionType,
paramCount: 0));
//Set the Key
SetPropertiesVisitor.TryGetPropertyName(node, node.Parent, out var propertyName);
var localName = propertyName.LocalName;
//Set the Key
var keyProperty = staticResourceExtensionType.GetProperty(context.Cache, pd => pd.Name == "Key", out _);
yield return Create(Dup);
yield return Create(Ldstr, key);
yield return Create(Callvirt, module.ImportReference(keyProperty.SetMethod));
yield return Create(Dup);
yield return Create(Ldstr, key);
yield return Create(Callvirt, module.ImportReference(keyProperty.SetMethod));
FieldReference bpRef = null;
PropertyDefinition propertyRef = null;
TypeReference declaringTypeReference = null;
if (node.Parent is IElementNode parentNode && propertyName != XmlName.Empty)
{
var parentType = module.ImportReference(parentNode.XmlType.GetTypeReference(context.Cache, module, (IXmlLineInfo)node));
bpRef = SetPropertiesVisitor.GetBindablePropertyReference(parentType,
propertyName.NamespaceURI,
ref localName,
out _,
context,
(IXmlLineInfo)node);
propertyRef = parentType.GetProperty(context.Cache, pd => pd.Name == localName, out declaringTypeReference);
FieldReference bpRef = null;
PropertyDefinition propertyRef = null;
TypeReference declaringTypeReference = null;
if (node.Parent is IElementNode parentNode && propertyName != XmlName.Empty)
{
var parentType = module.ImportReference(parentNode.XmlType.GetTypeReference(context.Cache, module, (IXmlLineInfo)node));
bpRef = SetPropertiesVisitor.GetBindablePropertyReference(parentType,
propertyName.NamespaceURI,
ref localName,
out _,
context,
(IXmlLineInfo)node);
propertyRef = parentType.GetProperty(context.Cache, pd => pd.Name == localName, out declaringTypeReference);
}
}
var requiredServices = staticResourceExtensionType.GetRequiredServices(context.Cache, module);
foreach (var instruction in node.PushServiceProvider(context, requiredServices, bpRef, propertyRef, declaringTypeReference))
yield return instruction;
foreach (var instruction in node.PushServiceProvider(context, requiredServices, bpRef, propertyRef, declaringTypeReference))
yield return instruction;
yield return Create(Callvirt, module.ImportMethodReference(context.Cache,
("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml", "StaticResourceExtension"),
methodName: "ProvideValue",
parameterTypes: new[] { ("System.ComponentModel", "System", "IServiceProvider") }));
}
}
}
}

Просмотреть файл

@ -65,7 +65,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
foreach (var n in en.CollectionItems)
n.Accept(visitor, cnode);
}
var il = new ArrayExtension().ProvideValue(node, Module, Context, out typeref);
var vardef = new VariableDefinition(typeref);
Context.Variables[node] = vardef;

Просмотреть файл

@ -98,7 +98,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
public static IEnumerable<Instruction> PushConvertedValue(this ValueNode node, ILContext context,
TypeReference targetTypeRef, IEnumerable<ICustomAttributeProvider> attributeProviders,
Func<TypeReference[],IEnumerable<Instruction>> pushServiceProvider, bool boxValueTypes, bool unboxValueTypes)
Func<TypeReference[], IEnumerable<Instruction>> pushServiceProvider, bool boxValueTypes, bool unboxValueTypes)
{
TypeReference typeConverter = null;
foreach (var attributeProvider in attributeProviders)
@ -119,7 +119,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
}
public static IEnumerable<Instruction> PushConvertedValue(this ValueNode node, ILContext context, FieldReference bpRef,
Func<TypeReference[],IEnumerable<Instruction>> pushServiceProvider, bool boxValueTypes, bool unboxValueTypes)
Func<TypeReference[], IEnumerable<Instruction>> pushServiceProvider, bool boxValueTypes, bool unboxValueTypes)
{
var module = context.Body.Method.Module;
var targetTypeRef = bpRef.GetBindablePropertyType(context.Cache, node, module);
@ -142,7 +142,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
}
public static IEnumerable<Instruction> PushConvertedValue(this ValueNode node, ILContext context,
TypeReference targetTypeRef, TypeReference typeConverter, Func<TypeReference[],IEnumerable<Instruction>> pushServiceProvider,
TypeReference targetTypeRef, TypeReference typeConverter, Func<TypeReference[], IEnumerable<Instruction>> pushServiceProvider,
bool boxValueTypes, bool unboxValueTypes)
{
var module = context.Body.Method.Module;
@ -619,7 +619,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
yield return Create(Newobj, module.ImportCtorReference(context.Cache, ("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml.Internals", "XamlServiceProvider"), parameterTypes: null));
//Add a SimpleValueTargetProvider and register it as IProvideValueTarget, IReferenceProvider and IProvideParentValues
if ( createAllServices
if (createAllServices
|| requiredServices.Contains(module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IProvideParentValues")), TypeRefComparer.Default)
|| requiredServices.Contains(module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IReferenceProvider")), TypeRefComparer.Default))
{

Просмотреть файл

@ -351,7 +351,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
Type compiledValueProviderType;
ICompiledValueProvider valueProvider;
if ( compiledValueProviderName != null
if (compiledValueProviderName != null
&& (compiledValueProviderType = Type.GetType(compiledValueProviderName)) != null
&& (valueProvider = Activator.CreateInstance(compiledValueProviderType) as ICompiledValueProvider) != null)
{
@ -1338,7 +1338,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
return false;
var bpTypeRef = bpRef.GetBindablePropertyType(context.Cache, iXmlLineInfo, module);
// If it's an attached BP, there's no second chance to handle IMarkupExtensions, so we try here.
// Worst case scenario ? InvalidCastException at runtime
@ -1398,16 +1398,16 @@ namespace Microsoft.Maui.Controls.Build.Tasks
var @else = Create(OpCodes.Nop);
var endif = Create(OpCodes.Nop);
if(context.Variables[elementNode].VariableType.FullName == "System.Object")
if (context.Variables[elementNode].VariableType.FullName == "System.Object")
{
//if(value != null && value.GetType().IsAssignableFrom(typeof(BindingBase)))
yield return Create(Ldloc, context.Variables[elementNode]);
yield return Create(Brfalse, @else);
yield return Create(Ldtoken, module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls", "BindingBase")));
yield return Create(Call, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Type"), methodName: "GetTypeFromHandle", parameterTypes: new[] { ("mscorlib", "System", "RuntimeTypeHandle") }, isStatic: true));
yield return Create(Ldloc, context.Variables[elementNode]);
yield return Create(Callvirt, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Object"), methodName: "GetType", paramCount: 0));
yield return Create(Callvirt, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Object"), methodName: "GetType", paramCount: 0));
yield return Create(Callvirt, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Type"), methodName: "IsAssignableFrom", parameterTypes: new[] { ("mscorlib", "System", "Type") }));
yield return Create(Brfalse, @else);
//then
@ -1421,9 +1421,9 @@ namespace Microsoft.Maui.Controls.Build.Tasks
yield return instruction;
if (bpTypeRef.IsValueType)
yield return Create(Box, module.ImportReference(bpTypeRef));
//endif
if(context.Variables[elementNode].VariableType.FullName == "System.Object")
if (context.Variables[elementNode].VariableType.FullName == "System.Object")
yield return endif;
}
@ -1470,7 +1470,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
return false;
var valueNode = node as ValueNode;
if (valueNode != null && valueNode.CanConvertValue(context, propertyType, new ICustomAttributeProvider[] { property, propertyType.ResolveCached(context.Cache) }))
if (valueNode != null && valueNode.CanConvertValue(context, propertyType, new ICustomAttributeProvider[] { property, propertyType.ResolveCached(context.Cache) }))
return true;
var elementNode = node as IElementNode;

Просмотреть файл

@ -324,7 +324,7 @@ namespace Microsoft.Maui.Controls.Build.Tasks
LoggingHelperExtensions.LoggedErrors = null;
}
}
if (initComp.HasCustomAttributes)
{
var suppressMessageAttribute = initComp.CustomAttributes.FirstOrDefault(ca => ca.AttributeType.FullName == "System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute");

Просмотреть файл

@ -27,7 +27,7 @@ namespace Microsoft.Maui.Controls
{
Binding.Apply(false);
}
public AppThemeBinding Binding { get; }
public void Unsubscribe()

Просмотреть файл

@ -147,7 +147,7 @@ namespace Microsoft.Maui.Controls
_ = layout.Children.Add(item);
}
}
internal static void Replace(this IBindableLayout layout, object item, int index)
{
if (layout is Maui.ILayout mauiLayout && item is IView view)
@ -212,7 +212,7 @@ namespace Microsoft.Maui.Controls
class BindableLayoutController
{
static readonly BindableProperty BindableLayoutTemplateProperty = BindableProperty.CreateAttached("BindableLayoutTemplate", typeof(DataTemplate), typeof(BindableLayoutController), default(DataTemplate));
/// <summary>
/// Gets the template reference used to generate a view in the <see cref="BindableLayout"/>.
/// </summary>
@ -220,7 +220,7 @@ namespace Microsoft.Maui.Controls
{
return (DataTemplate)b.GetValue(BindableLayoutTemplateProperty);
}
/// <summary>
/// Sets the template reference used to generate a view in the <see cref="BindableLayout"/>.
/// </summary>
@ -394,7 +394,7 @@ namespace Microsoft.Maui.Controls
// Remove exceeding items
while (index <= --childrenCount)
{
var child = (BindableObject) layoutChildren[childrenCount]!;
var child = (BindableObject)layoutChildren[childrenCount]!;
layout.RemoveAt(childrenCount);
// It's our responsibility to clear the BindingContext for the children
// Given that we've set them manually in CreateItemView
@ -409,22 +409,22 @@ namespace Microsoft.Maui.Controls
if (enumerator == null || !enumerator.MoveNext())
{
var layoutChildren = layout.Children;
// We may have a single child that is either the old empty view or a generated item
if (layoutChildren.Count == 1)
{
var maybeEmptyView = (View)layoutChildren[0]!;
// If the current empty view is already in place we have nothing to do
if (maybeEmptyView == _currentEmptyView)
{
return true;
}
// We may have a single child that is either the old empty view or a generated item
// So remove it to make room for the new empty view
layout.RemoveAt(0);
// If this is a generated item, we need to clear the BindingContext
if (maybeEmptyView.IsSet(BindableLayoutTemplateProperty))
{
@ -437,7 +437,7 @@ namespace Microsoft.Maui.Controls
// So clear them all to make room for the new empty view
ClearChildren(layout);
}
// If an empty view is set, add it
if (_currentEmptyView != null)
{
@ -457,7 +457,7 @@ namespace Microsoft.Maui.Controls
{
var child = (View)layout.Children[index]!;
layout.RemoveAt(index);
// It's our responsibility to clear the manually-set BindingContext for the generated children
child.ClearValue(BindableObject.BindingContextProperty);
}
@ -507,7 +507,7 @@ namespace Microsoft.Maui.Controls
}
return;
}
e.Apply(
insert: (item, index, _) =>
{
@ -523,7 +523,7 @@ namespace Microsoft.Maui.Controls
{
var child = (View)layout.Children[index]!;
layout.RemoveAt(index);
// It's our responsibility to clear the BindingContext for the children
// Given that we've set them manually in CreateItemView
child.BindingContext = null;
@ -540,7 +540,7 @@ namespace Microsoft.Maui.Controls
void ReplaceChild(object item, IBindableLayout layout, IList layoutChildren, int index)
{
var template = SelectTemplate(item, layout);
var child = (BindableObject) layoutChildren[index]!;
var child = (BindableObject)layoutChildren[index]!;
var currentTemplate = GetBindableLayoutTemplate(child);
if (currentTemplate == template)
{
@ -554,7 +554,7 @@ namespace Microsoft.Maui.Controls
layout.Replace(CreateItemView(item, template), index);
}
}
static View CreateItemView(object item, DataTemplate dataTemplate)
{
var view = (View)dataTemplate.CreateContent();

Просмотреть файл

@ -147,7 +147,7 @@ namespace Microsoft.Maui.Controls
//there's some side effect implemented in CoerceValue (see IsEnabled) that we need to trigger here
if (property.CoerceValue != null)
property.CoerceValue(this, newValue);
OnBindablePropertySet(property, original.Value, newValue, changed, changed);
}
@ -482,11 +482,12 @@ namespace Microsoft.Maui.Controls
if (property == null)
throw new ArgumentNullException(nameof(property));
if (value is BindingBase binding && !property.ReturnType.IsAssignableFrom(typeof(BindableProperty))) {
if (value is BindingBase binding && !property.ReturnType.IsAssignableFrom(typeof(BindableProperty)))
{
SetBinding(property, binding);
return;
}
if (property.IsReadOnly)
{
Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly.");
@ -658,7 +659,7 @@ namespace Microsoft.Maui.Controls
binding.Apply(true);
_applying = false;
}
OnBindablePropertySet(property, original, value, !sameValue, true);
}
else
@ -669,7 +670,7 @@ namespace Microsoft.Maui.Controls
private protected virtual void OnBindablePropertySet(BindableProperty property, object original, object value, bool didChange, bool willFirePropertyChanged)
{
if(willFirePropertyChanged)
if (willFirePropertyChanged)
{
OnPropertyChanged(property.PropertyName);
property.PropertyChanged?.Invoke(this, original, value);

Просмотреть файл

@ -1,8 +1,8 @@
#nullable disable
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Microsoft.Maui.Graphics;

Просмотреть файл

@ -129,7 +129,7 @@ namespace Microsoft.Maui.Controls
public string PropertyName { get; }
/// <include file="../../docs/Microsoft.Maui.Controls/BindableProperty.xml" path="//Member[@MemberName='ReturnType']/Docs/*" />
[DynamicallyAccessedMembers(ReturnTypeMembers)]
[DynamicallyAccessedMembers(ReturnTypeMembers)]
public Type ReturnType { get; }
internal BindablePropertyBindingChanging BindingChanging { get; private set; }

Просмотреть файл

@ -2,38 +2,38 @@ using System;
namespace Microsoft.Maui.Controls
{
partial class BindingBase
{
/// <summary>
/// This factory method was added to simplify creating TypedBindingBase instances from lambda getters.
/// </summary>
/// <typeparam name="TSource">The source type.</typeparam>
/// <typeparam name="TProperty">The property type.</typeparam>
/// <param name="getter">An getter method used to retrieve the source property.</param>
/// <param name="mode">The binding mode. This property is optional. Default is <see cref="F:Microsoft.Maui.Controls.BindingMode.Default" />.</param>
/// <param name="converter">The converter. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="converterParameter">An user-defined parameter to pass to the converter. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="stringFormat">A String format. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="source">An object used as the source for this binding. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="fallbackValue">The value to use instead of the default value for the property, if no specified value exists.</param>
/// <param name="targetNullValue">The value to supply for a bound property when the target of the binding is <see langword="null" />.</param>
/// <exception cref="ArgumentNullException"></exception>
public static BindingBase Create<TSource, TProperty>(
Func<TSource, TProperty> getter,
BindingMode mode = BindingMode.Default,
IValueConverter? converter = null,
object? converterParameter = null,
string? stringFormat = null,
object? source = null,
object? fallbackValue = null,
object? targetNullValue = null)
{
partial class BindingBase
{
/// <summary>
/// This factory method was added to simplify creating TypedBindingBase instances from lambda getters.
/// </summary>
/// <typeparam name="TSource">The source type.</typeparam>
/// <typeparam name="TProperty">The property type.</typeparam>
/// <param name="getter">An getter method used to retrieve the source property.</param>
/// <param name="mode">The binding mode. This property is optional. Default is <see cref="F:Microsoft.Maui.Controls.BindingMode.Default" />.</param>
/// <param name="converter">The converter. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="converterParameter">An user-defined parameter to pass to the converter. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="stringFormat">A String format. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="source">An object used as the source for this binding. This parameter is optional. Default is <see langword="null" />.</param>
/// <param name="fallbackValue">The value to use instead of the default value for the property, if no specified value exists.</param>
/// <param name="targetNullValue">The value to supply for a bound property when the target of the binding is <see langword="null" />.</param>
/// <exception cref="ArgumentNullException"></exception>
public static BindingBase Create<TSource, TProperty>(
Func<TSource, TProperty> getter,
BindingMode mode = BindingMode.Default,
IValueConverter? converter = null,
object? converterParameter = null,
string? stringFormat = null,
object? source = null,
object? fallbackValue = null,
object? targetNullValue = null)
{
if (!RuntimeFeature.AreBindingInterceptorsSupported)
{
throw new InvalidOperationException($"Call to Create<{typeof(TSource)}, {typeof(TProperty)}> could not be intercepted because the feature has been disabled. Consider removing the DisableMauiAnalyzers property from your project file or set the _MauiBindingInterceptorsSupport property to true instead.");
}
throw new InvalidOperationException($"Call to Create<{typeof(TSource)}, {typeof(TProperty)}>() was not intercepted.");
}
}
throw new InvalidOperationException($"Call to Create<{typeof(TSource)}, {typeof(TProperty)}>() was not intercepted.");
}
}
}

Просмотреть файл

@ -78,7 +78,7 @@ namespace Microsoft.Maui.Controls
}
}
}
_targetProperty = property;
_specificity = specificity;
@ -396,7 +396,7 @@ namespace Microsoft.Maui.Controls
part.LastGetter = propertyGetMethod;
}
if (property is {CanWrite: true, SetMethod: {IsPublic: true, IsStatic: false} propertySetMethod})
if (property is { CanWrite: true, SetMethod: { IsPublic: true, IsStatic: false } propertySetMethod })
{
part.LastSetter = propertySetMethod;
part.SetterType = propertyType;

Просмотреть файл

@ -2,13 +2,13 @@
using System;
using System.Collections.Generic;
using System.Text;
using CoreGraphics;
using Microsoft.Extensions.Logging;
using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Handlers;
using UIKit;
using CoreGraphics;
using Microsoft.Extensions.Logging;
using Microsoft.Maui.Layouts;
using UIKit;
namespace Microsoft.Maui.Controls
{
@ -115,13 +115,13 @@ namespace Microsoft.Maui.Controls
var titleRectHeight = titleRect.Height;
var buttonContentWidth =
+ (nfloat)Math.Max(titleRectWidth, platformButton.CurrentImage?.Size.Width ?? 0)
+(nfloat)Math.Max(titleRectWidth, platformButton.CurrentImage?.Size.Width ?? 0)
+ (nfloat)padding.Left
+ (nfloat)padding.Right
+ (nfloat)borderWidth * 2;
var buttonContentHeight =
+ (nfloat)Math.Max(titleRectHeight, platformButton.CurrentImage?.Size.Height ?? 0)
+(nfloat)Math.Max(titleRectHeight, platformButton.CurrentImage?.Size.Height ?? 0)
+ (nfloat)padding.Top
+ (nfloat)padding.Bottom
+ (nfloat)borderWidth * 2;
@ -276,7 +276,7 @@ namespace Microsoft.Maui.Controls
/// <param name="padding"></param>
/// <param name="isMeasuring"></param>
/// <returns>Returns a <see cref="CGRect"/> that contains the title text.</returns>
CGRect ComputeTitleRect (UIButton platformButton, Button button, UIImage image, double widthConstraint, double heightConstraint, double borderWidth, Thickness padding, bool isMeasuring)
CGRect ComputeTitleRect(UIButton platformButton, Button button, UIImage image, double widthConstraint, double heightConstraint, double borderWidth, Thickness padding, bool isMeasuring)
{
if (string.IsNullOrEmpty(platformButton.CurrentTitle))
{
@ -312,7 +312,7 @@ namespace Microsoft.Maui.Controls
if (currentTitleText.Length > 0 && button.ContentLayout.Position == ButtonContentLayout.ImagePosition.Left || button.ContentLayout.Position == ButtonContentLayout.ImagePosition.Right)
{
// Measure the width of the first character in the string using the same font as the TitleLabel. If a character cannot fit in the titleRect, let's use a zero size.
var minimumCharacterWidth = new Foundation.NSString(currentTitleText.Substring(0,1)).GetSizeUsingAttributes(new UIStringAttributes { Font = platformButton.TitleLabel.Font });
var minimumCharacterWidth = new Foundation.NSString(currentTitleText.Substring(0, 1)).GetSizeUsingAttributes(new UIStringAttributes { Font = platformButton.TitleLabel.Font });
if (double.IsNaN(titleRect.Width) || double.IsNaN(titleRect.Height) || titleRect.Width < minimumCharacterWidth.Width)
{
titleRect = Rect.Zero;

Просмотреть файл

@ -7,11 +7,11 @@ using Android.Util;
using Android.Views;
using Android.Widget;
using AndroidX.AppCompat.App;
using Microsoft.Maui.Controls.Platform;
using AActionMode = global::AndroidX.AppCompat.View.ActionMode;
using AListView = Android.Widget.ListView;
using AView = Android.Views.View;
using Microsoft.Maui.Controls.Platform;
using AMenu = Android.Views.IMenu;
using AView = Android.Views.View;
namespace Microsoft.Maui.Controls.Handlers.Compatibility
{

Просмотреть файл

@ -159,7 +159,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
base.UpdateValue(property);
var args = new PropertyChangedEventArgs(property);
if (VirtualView is BindableObject bindableObject &&
GetRealCell(bindableObject) is CellTableViewCell ctv )
GetRealCell(bindableObject) is CellTableViewCell ctv)
{
ctv.HandlePropertyChanged(bindableObject, args);
}
@ -171,7 +171,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
{
base.Invoke(command, args);
if (command == "ForceUpdateSizeRequested" &&
if (command == "ForceUpdateSizeRequested" &&
VirtualView is BindableObject bindableObject &&
GetRealCell(bindableObject) is UITableViewCell ctv &&
_tableView is not null &&

Просмотреть файл

@ -11,6 +11,7 @@ using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;
using Microsoft.Maui.Devices;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Platform;
using ObjCRuntime;
using UIKit;
using static Microsoft.Maui.Controls.Compatibility.Platform.iOS.AccessibilityExtensions;
@ -21,7 +22,6 @@ using PageUIStatusBarAnimation = Microsoft.Maui.Controls.PlatformConfiguration.i
using PointF = CoreGraphics.CGPoint;
using RectangleF = CoreGraphics.CGRect;
using SizeF = CoreGraphics.CGSize;
using Microsoft.Maui.Platform;
namespace Microsoft.Maui.Controls.Handlers.Compatibility
{
@ -737,7 +737,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
}
else
{
if(barBackgroundColor?.Alpha < 1f)
if (barBackgroundColor?.Alpha < 1f)
navigationBarAppearance.ConfigureWithTransparentBackground();
else
navigationBarAppearance.ConfigureWithOpaqueBackground();
@ -758,7 +758,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
}
else
{
if(barBackgroundColor?.Alpha == 0f)
if (barBackgroundColor?.Alpha == 0f)
{
NavigationBar.SetTransparentNavigationBar();
}
@ -1105,7 +1105,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
if (r.Element is NavigationPage np && !_finishedWithInitialNavigation)
{
_finishedWithInitialNavigation = true;
_finishedWithInitialNavigation = true;
np.SendNavigatedFromHandler(null, NavigationType.Push);
}
@ -1221,7 +1221,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
!n._disposed &&
!n._navigating
)
{
{
var vc = ChildViewControllers[^1];
if (vc is null)
@ -1314,7 +1314,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
{
if (dispose)
NavigationItem.TitleView.Dispose();
NavigationItem.TitleView = null;
}

Просмотреть файл

@ -405,7 +405,7 @@ namespace Microsoft.Maui.Controls.Platform.Compatibility
// If you try to use Margin the RecylcerView won't render anything.
if (flyoutView is AndroidX.Core.View.IScrollingView &&
flyoutView is ViewGroup vg)
{
{
if (vg.PaddingBottom != bottomOffset)
{
vg.SetPadding(0, 0, 0, bottomOffset);

Просмотреть файл

@ -143,7 +143,7 @@ namespace Microsoft.Maui.Controls.Platform.Compatibility
else
{
if (background != null)
navBar.BarTintColor = background.ToPlatform();
navBar.BarTintColor = background.ToPlatform();
if (foreground != null)
navBar.TintColor = foreground.ToPlatform();
}

Просмотреть файл

@ -43,7 +43,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
};
}
}
#region IShellContext

Просмотреть файл

@ -2,8 +2,8 @@
using System;
using System.Collections.Specialized;
using Foundation;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Extensions.Logging;
using Microsoft.Maui.Controls.Internals;
using ObjCRuntime;
using UIKit;

Просмотреть файл

@ -94,7 +94,7 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
// https://cs.android.com/android/platform/superproject/main/+/main:frameworks/base/core/java/android/widget/ListView.java;l=1314-1322?q=ListView
// This causes issues because if a TextCell already has a view that's attached to the visual tree, then `OnMeasure(AT_MOST)`
// will call "GetView" without a convert view. Android basically creates an in memory copy of the table to calculate the measure.
//
//
// Our problem is that we don't have a way of knowing if a view we are returning from getView will be the one we
// should track against our TextCellHandler or not.
// This all worked fine in XF because in XF we didn't really block against just creating as many renderers against a single

Просмотреть файл

@ -229,7 +229,8 @@ namespace Microsoft.Maui.Controls.Handlers.Compatibility
_pendingSuperViewSetNeedsLayout = false;
this.Superview?.SetNeedsLayout();
}
else{
else
{
_pendingSuperViewSetNeedsLayout = true;
}
}

Просмотреть файл

@ -50,7 +50,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS
this.SetAccessibilityLabel(item);
}
void OnClicked (object sender, EventArgs e)
void OnClicked(object sender, EventArgs e)
{
if (_item.TryGetTarget(out var item))
{
@ -148,7 +148,7 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.iOS
this.SetAccessibilityLabel(item);
}
void OnClicked (object sender, EventArgs e)
void OnClicked(object sender, EventArgs e)
{
if (_item.TryGetTarget(out var item))
{

Просмотреть файл

@ -99,7 +99,7 @@ namespace Microsoft.Maui.Controls
if (ShouldSetBinding(content, FontElement.FontFamilyProperty))
{
content.SetBinding(FontElement.FontFamilyProperty, static (IFontElement fe) => fe.FontFamily, source: source);
}
}
}
static bool ShouldSetBinding(BindableObject content, BindableProperty property)

Просмотреть файл

@ -45,7 +45,7 @@ namespace Microsoft.Maui.Controls
IDisposable? SetupHideSoftInputOnTapped(AView aView)
{
if (aView is AViewGroup vg &&
vg.GetFirstChildOfType<EditText>() is {} editText)
vg.GetFirstChildOfType<EditText>() is { } editText)
{
aView = editText;
}

Просмотреть файл

@ -1,9 +1,9 @@
#nullable disable
using System;
using System.ComponentModel;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Layouts;
using Microsoft.Maui.Controls.Internals;
namespace Microsoft.Maui.Controls
{

Просмотреть файл

@ -129,7 +129,7 @@ namespace Microsoft.Maui.Controls
{
(this as IEditorController).SendCompleted();
}
protected override Size ArrangeOverride(Rect bounds)
{
_previousBounds = bounds;

Просмотреть файл

@ -282,7 +282,7 @@ namespace Microsoft.Maui.Controls
internal Element ParentOverride
{
get
get
{
if (_parentOverride is null)
{
@ -335,8 +335,8 @@ namespace Microsoft.Maui.Controls
WeakReference<Element> _realParent;
/// <summary>For internal use by .NET MAUI.</summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public Element RealParent
{
public Element RealParent
{
get
{
if (_realParent is null)
@ -356,7 +356,7 @@ namespace Microsoft.Maui.Controls
}
return null;
}
}
private set
{
if (value is null)
@ -634,11 +634,11 @@ namespace Microsoft.Maui.Controls
HashSet<string> _pendingHandlerUpdatesFromBPSet = new HashSet<string>();
private protected override void OnBindablePropertySet(BindableProperty property, object original, object value, bool changed, bool willFirePropertyChanged)
{
if(willFirePropertyChanged)
if (willFirePropertyChanged)
{
_pendingHandlerUpdatesFromBPSet.Add(property.PropertyName);
}
base.OnBindablePropertySet(property, original, value, changed, willFirePropertyChanged);
_pendingHandlerUpdatesFromBPSet.Remove(property.PropertyName);
UpdateHandlerValue(property.PropertyName, changed);
@ -1066,8 +1066,8 @@ namespace Microsoft.Maui.Controls
/// <inheritdoc/>
IFlyout IContextFlyoutElement.ContextFlyout => FlyoutBase.GetContextFlyout(this);
HandlerDisconnectPolicy IHandlerDisconnectPolicies.DisconnectPolicy
{
HandlerDisconnectPolicy IHandlerDisconnectPolicies.DisconnectPolicy
{
get => HandlerProperties.GetDisconnectPolicy(this);
set => HandlerProperties.SetDisconnectPolicy(this, value);
}

Просмотреть файл

@ -4,20 +4,20 @@ namespace Microsoft.Maui.Controls
{
public static class HandlerProperties
{
public static readonly BindableProperty DisconnectPolicyProperty = BindableProperty.CreateAttached(
"DisconnectPolicy",
typeof(HandlerDisconnectPolicy),
typeof(HandlerProperties),
HandlerDisconnectPolicy.Automatic);
public static readonly BindableProperty DisconnectPolicyProperty = BindableProperty.CreateAttached(
"DisconnectPolicy",
typeof(HandlerDisconnectPolicy),
typeof(HandlerProperties),
HandlerDisconnectPolicy.Automatic);
public static void SetDisconnectPolicy(BindableObject target, HandlerDisconnectPolicy value)
{
target.SetValue(DisconnectPolicyProperty, value);
}
public static void SetDisconnectPolicy(BindableObject target, HandlerDisconnectPolicy value)
{
target.SetValue(DisconnectPolicyProperty, value);
}
public static HandlerDisconnectPolicy GetDisconnectPolicy(BindableObject target)
{
return (HandlerDisconnectPolicy)target.GetValue(DisconnectPolicyProperty);
}
}
public static HandlerDisconnectPolicy GetDisconnectPolicy(BindableObject target)
{
return (HandlerDisconnectPolicy)target.GetValue(DisconnectPolicyProperty);
}
}
}

Просмотреть файл

@ -126,7 +126,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
void UpdateHasFooter()
{
ItemsSource.HasFooter = (ItemsView.Footer ?? ItemsView.FooterTemplate) is not null;
ItemsSource.HasFooter = (ItemsView.Footer ?? ItemsView.FooterTemplate) is not null;
}
bool IsHeader(int position)

Просмотреть файл

@ -31,8 +31,8 @@ namespace Microsoft.Maui.Controls.Handlers.Items
AView PlatformView => Content?.ContainerView ?? Content?.PlatformView;
internal Func<Size?> RetrieveStaticSize
{
internal Func<Size?> RetrieveStaticSize
{
get => _retrieveStaticSize?.Target as Func<Size?>;
set => _retrieveStaticSize = new WeakReference(value);
}
@ -115,7 +115,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
// This means a different cell has already set our new size
// so let's just use that instead of perform our own speculative measure
if (possibleNewSize is not null &&
if (possibleNewSize is not null &&
_pixelSize is not null &&
!_pixelSize.Equals(possibleNewSize))
{

Просмотреть файл

@ -571,46 +571,42 @@ namespace Microsoft.Maui.Controls.Handlers.Items
protected override void OnMeasure(int widthMeasureSpec, int heightMeasureSpec)
{
if (Carousel.Loop)
// If the height or width are unbounded and the user is set to
// Loop then we can't just do an infinite measure.
// Looping works by setting item count to 16384 so if the
// CarV has infinite room it'll generate all 16384 items.
// This code forces the adapter to just measure the first item
// And then that measure is used for the WxH of the CarouselView
// I found that "AtMost" also causes this behavior so
// that's why I'm turning "AtMost" into "Exactly"
if (MeasureSpec.GetMode(widthMeasureSpec) == MeasureSpecMode.AtMost)
{
// If the height or width are unbounded and the user is set to
// Loop then we can't just do an infinite measure.
// Looping works by setting item count to 16384 so if the
// CarV has infinite room it'll generate all 16384 items.
// This code forces the adapter to just measure the first item
// And then that measure is used for the WxH of the CarouselView
// I found that "AtMost" also causes this behavior so
// that's why I'm turning "AtMost" into "Exactly"
if (MeasureSpec.GetMode(widthMeasureSpec) == MeasureSpecMode.AtMost)
{
widthMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(widthMeasureSpec.GetSize());
}
if (MeasureSpec.GetMode(heightMeasureSpec) == MeasureSpecMode.AtMost)
{
heightMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(heightMeasureSpec.GetSize());
}
if (MeasureSpec.GetMode(widthMeasureSpec) == MeasureSpecMode.Unspecified ||
MeasureSpec.GetMode(heightMeasureSpec) == MeasureSpecMode.Unspecified)
{
if (ItemsViewAdapter.ItemCount > 0)
{
// Retrieve the first item of the CarouselView and measure it
// This is what we'll use for the CarV WxH if the requested measure
// is for an infinite amount of space
var viewType = ItemsViewAdapter.GetItemViewType(0);
var viewHolder = (ViewHolder)ItemsViewAdapter.CreateViewHolder(this, viewType);
ItemsViewAdapter.BindViewHolder(viewHolder, 0);
viewHolder.ItemView.Measure(widthMeasureSpec, heightMeasureSpec);
widthMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(viewHolder.ItemView.MeasuredWidth);
heightMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(viewHolder.ItemView.MeasuredHeight);
}
}
widthMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(widthMeasureSpec.GetSize());
}
if (MeasureSpec.GetMode(heightMeasureSpec) == MeasureSpecMode.AtMost)
{
heightMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(heightMeasureSpec.GetSize());
}
if (MeasureSpec.GetMode(widthMeasureSpec) == MeasureSpecMode.Unspecified ||
MeasureSpec.GetMode(heightMeasureSpec) == MeasureSpecMode.Unspecified)
{
if (ItemsViewAdapter.ItemCount > 0)
{
// Retrieve the first item of the CarouselView and measure it
// This is what we'll use for the CarV WxH if the requested measure
// is for an infinite amount of space
var viewType = ItemsViewAdapter.GetItemViewType(0);
var viewHolder = (ViewHolder)ItemsViewAdapter.CreateViewHolder(this, viewType);
ItemsViewAdapter.BindViewHolder(viewHolder, 0);
viewHolder.ItemView.Measure(widthMeasureSpec, heightMeasureSpec);
widthMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(viewHolder.ItemView.MeasuredWidth);
heightMeasureSpec = MeasureSpecMode.Exactly.MakeMeasureSpec(viewHolder.ItemView.MeasuredHeight);
}
}
base.OnMeasure(widthMeasureSpec, heightMeasureSpec);
}

Просмотреть файл

@ -60,7 +60,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
var content = template.CreateContent();
View = content as View;
if(View is null)
if (View is null)
{
throw new InvalidOperationException($"{template} could not be created from {content}");
}

Просмотреть файл

@ -60,7 +60,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
{
// If the initial position hasn't been set, we have a UpdateInitialPosition call on CarouselViewController
// that will handle this so we want to skip this mapper call. We need to wait for the CollectionView to be ready
if(handler.Controller is CarouselViewController carouselViewController && carouselViewController.InitialPositionSet)
if (handler.Controller is CarouselViewController carouselViewController && carouselViewController.InitialPositionSet)
{
carouselViewController.UpdateFromPosition();
}
@ -71,7 +71,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
(handler.Controller as CarouselViewController)?.UpdateLoop();
}
public override Size GetDesiredSize(double widthConstraint, double heightConstraint) =>
public override Size GetDesiredSize(double widthConstraint, double heightConstraint) =>
this.GetDesiredSizeFromHandler(widthConstraint, heightConstraint);
}
}

Просмотреть файл

@ -18,7 +18,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
}
public static PropertyMapper<TItemsView, StructuredItemsViewHandler<TItemsView>> StructuredItemsViewMapper = new(ItemsViewMapper)
{
{
#if TIZEN
[StructuredItemsView.HeaderProperty.PropertyName] = MapHeader,
[StructuredItemsView.FooterProperty.PropertyName] = MapFooter,

Просмотреть файл

@ -225,7 +225,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
DeviceDisplay.MainDisplayInfoChanged -= OnDisplayInfoChanged;
UnsubscribeCollectionItemsSourceChanged(ItemsSource);
_carouselViewLoopManager?.Dispose();
_carouselViewLoopManager = null;
}
@ -233,9 +233,9 @@ namespace Microsoft.Maui.Controls.Handlers.Items
void Setup(CarouselView carouselView)
{
InitializeCarouselViewLoopManager();
_oldViews = new List<View>();
carouselView.Scrolled += CarouselViewScrolled;
DeviceDisplay.MainDisplayInfoChanged += OnDisplayInfoChanged;
@ -563,7 +563,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
}
// We aren't ready to update the visual states yet
if(_oldViews == null)
if (_oldViews == null)
{
return;
}

Просмотреть файл

@ -35,7 +35,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
[UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Proven safe in test: MemoryTests.HandlerDoesNotLeak")]
Func<UICollectionViewCell> _getPrototype;
[UnconditionalSuppressMessage("Memory", "MEM0002", Justification = "Proven safe in test: MemoryTests.HandlerDoesNotLeak")]
Func<NSIndexPath, UICollectionViewCell> _getPrototypeForIndexPath;
CGSize _previousContentSize = CGSize.Empty;
@ -263,7 +263,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
_previousContentSize = contentSize.Value;
}
internal Size? GetSize()
{
@ -577,7 +577,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
uiView?.Dispose();
uiView = null;
formsElement?.Handler?.DisconnectHandler();
formsElement = null;
}
else

Просмотреть файл

@ -105,7 +105,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
return ItemsViewLayout.GetMinimumLineSpacingForSection(collectionView, layout, section);
}
public override void CellDisplayingEnded(UICollectionView collectionView, UICollectionViewCell cell, NSIndexPath indexPath)
{
ViewController?.CellDisplayingEndedFromDelegate(cell, indexPath);

Просмотреть файл

@ -624,10 +624,10 @@ namespace Microsoft.Maui.Controls.Handlers.Items
var group = 0;
var collectionViewWidth = CollectionView.Bounds.Width;
var numberOfItemsInGroup = CollectionView.NumberOfItemsInSection(group);
// Calculate the number of cells that can fit in the viewport
var numberOfCellsToCheck = Math.Min((int)(collectionViewWidth / existingMeasurement.Width) + 1, numberOfItemsInGroup);
// Iterate through the cells and find the one with a wider width
for (int i = 1; i < numberOfCellsToCheck; i++)
{
@ -636,13 +636,13 @@ namespace Microsoft.Maui.Controls.Handlers.Items
{
cellAtIndex.ConstrainTo(ConstrainedDimension);
var measureCellAtIndex = cellAtIndex.Measure();
// Check if the cell has a wider width
if (measureCellAtIndex.Width > existingMeasurement.Width)
{
existingMeasurement = measureCellAtIndex;
}
// TODO: Cache this cell size
}
}

Просмотреть файл

@ -31,7 +31,7 @@ internal class MauiCollectionView : UICollectionView, IUIViewLifeCycleEvents
base.MovedToWindow();
_movedToWindow?.Invoke(this, EventArgs.Empty);
if(_customDelegate?.TryGetTarget(out var target) == true)
if (_customDelegate?.TryGetTarget(out var target) == true)
{
target.MovedToWindow(this);
}

Просмотреть файл

@ -128,7 +128,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
ref _headerUIView, ref _headerViewFormsElement);
UpdateHeaderFooterPosition();
if(_headerUIView is MauiView mv)
if (_headerUIView is MauiView mv)
{
mv.LayoutChanged += HeaderViewLayoutChanged;
}

Просмотреть файл

@ -170,7 +170,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
// Create the content and renderer for the view
var content = itemTemplate.CreateContent();
if(content is not View view)
if (content is not View view)
{
throw new InvalidOperationException($"{itemTemplate} could not be created from {content}");
}
@ -339,7 +339,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items
{
return;
}
// Prevents the use of default color when there are VisualStateManager with Selected state setting the background color
// First we check whether the cell has the default selected background color; if it does, then we should check
// to see if the cell content is the VSM to set a selected color

Просмотреть файл

@ -137,7 +137,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
}
}
//Update the CarouselView position
cv2Controller?.SetPosition(carouselPosition);

Просмотреть файл

@ -12,9 +12,9 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
internal class LayoutHeaderFooterInfo
{
public IView FooterView { get; set; }
public IView HeaderView { get; set; }
public DataTemplate FooterTemplate { get; set; }
public DataTemplate HeaderTemplate { get; set; }
public IView HeaderView { get; set; }
public DataTemplate FooterTemplate { get; set; }
public DataTemplate HeaderTemplate { get; set; }
public bool HasHeader { get; set; }
public bool HasFooter { get; set; }
}
@ -162,7 +162,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
if (args.PropertyName == nameof(ItemsLayout.SnapPointsAlignment) ||
args.PropertyName == nameof(ItemsLayout.SnapPointsType) ||
args.PropertyName == nameof(GridItemsLayout.VerticalItemSpacing) ||
args.PropertyName == nameof(GridItemsLayout.HorizontalItemSpacing) ||
args.PropertyName == nameof(GridItemsLayout.HorizontalItemSpacing) ||
args.PropertyName == nameof(GridItemsLayout.Span) ||
args.PropertyName == nameof(LinearItemsLayout.ItemSpacing))
@ -188,7 +188,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
public static void MapHeaderTemplate(CollectionViewHandler2 handler, StructuredItemsView itemsView)
{
handler.UpdateLayout();
// (handler.Controller as StructuredItemsViewController2<ReorderableItemsView>)?.UpdateHeaderView();
// (handler.Controller as StructuredItemsViewController2<ReorderableItemsView>)?.UpdateHeaderView();
}
public static void MapFooterTemplate(CollectionViewHandler2 handler, StructuredItemsView itemsView)

Просмотреть файл

@ -66,7 +66,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
protected abstract UICollectionViewLayout SelectLayout();
protected abstract ItemsViewController2<TItemsView> CreateController(TItemsView newElement, UICollectionViewLayout layout);
protected override UIView CreatePlatformView() => Controller?.View;
public static void MapItemsSource(ItemsViewHandler2<TItemsView> handler, ItemsView itemsView)
@ -178,10 +178,10 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
// public override Size GetDesiredSize(double widthConstraint, double heightConstraint)
// {
// var size = base.GetDesiredSize(widthConstraint, heightConstraint);
// var potentialContentSize = Controller.GetSize();
// System.Diagnostics.Debug.WriteLine($"potentialContentSize: {potentialContentSize}");
// // If contentSize comes back null, it means none of the content has been realized yet;
// // we need to return the expansive size the collection view wants by default to get
@ -190,19 +190,19 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
// {
// return size;
// }
// var contentSize = potentialContentSize.Value;
// // If contentSize does have a value, our target size is the smaller of it and the constraints
// size.Width = contentSize.Width <= widthConstraint ? contentSize.Width : widthConstraint;
// size.Height = contentSize.Height <= heightConstraint ? contentSize.Height : heightConstraint;
// var virtualView = this.VirtualView as IView;
// size.Width = ViewHandlerExtensions.ResolveConstraints(size.Width, virtualView.Width, virtualView.MinimumWidth, virtualView.MaximumWidth);
// size.Height = ViewHandlerExtensions.ResolveConstraints(size.Height, virtualView.Height, virtualView.MinimumHeight, virtualView.MaximumHeight);
// return size;
// }
}

Просмотреть файл

@ -630,7 +630,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
public CarouselViewLoopManager()
{
}
protected virtual void Dispose(bool disposing)
{

Просмотреть файл

@ -10,7 +10,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
public class DefaultCell2 : ItemsViewCell2
{
//public const string ReuseId = "Microsoft.Maui.Controls.DefaultCell2";
public UILabel Label { get; }
protected NSLayoutConstraint Constraint { get; set; }

Просмотреть файл

@ -90,7 +90,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
// If the IndexPath is less than 2, it's a header or footer for a section not a group
if (indexPath.Length < 2 || (ItemsView.GroupFooterTemplate is null && ItemsView.GroupHeaderTemplate is null))
{
var suplementaryViewFromStructuredView = base.GetViewForSupplementaryElement(collectionView, elementKind, indexPath);
if (suplementaryViewFromStructuredView is not null)
{

Просмотреть файл

@ -10,12 +10,12 @@ namespace Microsoft.Maui.Controls.Handlers.Items2;
internal static class ItemsSourceFactory2
{
public static ILoopItemsViewSource CreateForCarouselView(IEnumerable itemsSource, UICollectionViewController collectionViewController, bool loop)
{
if (itemsSource == null)
{
return new EmptySource();
}
public static ILoopItemsViewSource CreateForCarouselView(IEnumerable itemsSource, UICollectionViewController collectionViewController, bool loop)
{
if (itemsSource == null)
{
return new EmptySource();
}
return itemsSource switch
{

Просмотреть файл

@ -203,7 +203,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
DetachingFromWindow();
}
}
internal void DisposeItemsSource()
{
ItemsSource?.Dispose();

Просмотреть файл

@ -105,7 +105,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
return default; // TODO: Fix ItemsViewLayout.GetMinimumLineSpacingForSection(collectionView, layout, section);
}
public override void CellDisplayingEnded(UICollectionView collectionView, UICollectionViewCell cell, NSIndexPath indexPath)
{
ViewController?.CellDisplayingEndedFromDelegate(cell, indexPath);

Просмотреть файл

@ -180,7 +180,7 @@ internal static class LayoutFactory2
section.BoundarySupplementaryItems = CreateSupplementaryItems(
groupingInfo,
headerFooterInfo,
headerFooterInfo,
scrollDirection,
groupWidth,
groupHeight);

Просмотреть файл

@ -24,6 +24,6 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
public bool Loop { get; set; }
public int LoopCount => Loop && Count > 0 ? Count + 2 : Count;
public int LoopCount => Loop && Count > 0 ? Count + 2 : Count;
}
}

Просмотреть файл

@ -1,11 +1,11 @@
#nullable disable
using System;
using System.Collections;
using System.Collections.Specialized;
using Foundation;
using Microsoft.Maui.Controls.Handlers.Items;
using ObjCRuntime;
using UIKit;
using Microsoft.Maui.Controls.Handlers.Items;
using System.Collections.Specialized;
namespace Microsoft.Maui.Controls.Handlers.Items2
{

Просмотреть файл

@ -51,7 +51,7 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
public override UICollectionReusableView GetViewForSupplementaryElement(UICollectionView collectionView, NSString elementKind, NSIndexPath indexPath)
{
// We don't have a header or footer, so we don't need to do anything
if(ItemsView.Header is null && ItemsView.Footer is null && ItemsView.HeaderTemplate is null && ItemsView.FooterTemplate is null)
if (ItemsView.Header is null && ItemsView.Footer is null && ItemsView.HeaderTemplate is null && ItemsView.FooterTemplate is null)
{
return null;
}
@ -94,9 +94,9 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
string DetermineViewReuseId(NSString elementKind)
{
return DetermineViewReuseId(elementKind == UICollectionElementKindSectionKey.Header
? ItemsView.HeaderTemplate
? ItemsView.HeaderTemplate
: ItemsView.FooterTemplate, elementKind == UICollectionElementKindSectionKey.Header
? ItemsView.Header
? ItemsView.Header
: ItemsView.Footer);
}
@ -113,13 +113,13 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
{
bool isHeader = elementKind == UICollectionElementKindSectionKey.Header;
if(isHeader)
if (isHeader)
{
if(ItemsView.Header is View headerView)
if (ItemsView.Header is View headerView)
{
cell.Bind(headerView, ItemsView);
}
else if(ItemsView.HeaderTemplate is not null)
else if (ItemsView.HeaderTemplate is not null)
{
cell.Bind(ItemsView.HeaderTemplate, ItemsView.Header, ItemsView);
}
@ -127,11 +127,11 @@ namespace Microsoft.Maui.Controls.Handlers.Items2
}
else
{
if(ItemsView.Footer is View footerView)
if (ItemsView.Footer is View footerView)
{
cell.Bind(footerView, ItemsView);
}
else if(ItemsView.FooterTemplate is not null)
else if (ItemsView.FooterTemplate is not null)
{
cell.Bind(ItemsView.FooterTemplate, ItemsView.Footer, ItemsView);
}

Просмотреть файл

@ -19,7 +19,7 @@ namespace Microsoft.Maui.Controls
readonly WeakEventManager _weakEventManager = new WeakEventManager();
internal readonly MergedStyle _mergedStyle;
protected ImageSource()
{
_mergedStyle = new MergedStyle(GetType(), this);

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше