diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index c772b2c43e..cf10642816 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -16,21 +16,16 @@ Summary of the change and any relevant info. - [ ] WPF .NET 6 - [ ] WPF Framework - [ ] WinUI -- [ ] Xamarin.Forms Android -- [ ] Xamarin.Forms iOS -- [ ] Xamarin.Forms UWP - -- [ ] UWP -- [ ] Xamarin.Android -- [ ] Xamarin.iOS +- [ ] MAUI Windows +- [ ] MAUI Android +- [ ] MAUI iOS ## Checklist +- [ ] Self-review of changes - [ ] Runs and compiles on all active platforms -- [ ] Legacy platforms still compile and run (if applicable) - [ ] Branch is up to date with the latest main/v.next - [ ] All merge conflicts have been resolved -- [ ] Self-review of changes - [ ] There are no warnings related to changes - [ ] No unrelated changes have been made to any other code or project files - [ ] `sample_sync.py` runs without making changes @@ -38,4 +33,4 @@ Summary of the change and any relevant info. - [ ] Code is commented with correct formatting - [ ] All variable and method names are good and make sense - [ ] There is no leftover commented code -- [ ] Screenshots are correct size and display in description tab +- [ ] Screenshots are correct size and display in description tab (800 x 600 on Windows, 600 height mobile screenshots for MAUI) diff --git a/.gitignore b/.gitignore index b64d8315fb..a25d53c659 100644 --- a/.gitignore +++ b/.gitignore @@ -116,7 +116,6 @@ TestResult.xml project.lock.json project.fragment.lock.json artifacts/ -**/Properties/launchSettings.json *_i.c *_p.c *_i.h diff --git a/README.md b/README.md index 43416b43e3..d09f09b008 100644 --- a/README.md +++ b/README.md @@ -8,12 +8,12 @@ [![Link: NuGet](https://img.shields.io/badge/NuGet-633b9b?style=flat-square&logo=nuget&labelColor=gray)](https://www.nuget.org/profiles/Esri_Inc) [![Link: Esri Community](https://img.shields.io/badge/🙋-Get%20help%20in%20Esri%20Community-633b9b?style=flat-square)](https://community.esri.com/t5/arcgis-runtime-sdk-for-net/bd-p/arcgis-runtime-sdk-dotnet-questions) -# ArcGIS Runtime SDK for .NET - Samples +# ArcGIS Maps SDK for .NET - Samples Screenshot of the sample viewer for WPF
-**Interactive samples demonstrate the ArcGIS Runtime API** +**Interactive samples demonstrate the ArcGIS Maps SDK for .NET API** ## Get started @@ -23,41 +23,34 @@ If you're on Windows, the easiest way to get started is to download the viewer f Or, you can browse a searchable list of samples on the ArcGIS for developers website: -[![Link: Xamarin.Forms](https://img.shields.io/badge/Xamarin.Forms-3498db?style=flat-square&labelColor=gray&logo=Xamarin)](https://developers.arcgis.com/net/forms/sample-code/) [![Link: WPF](https://img.shields.io/badge/WPF-0078d6?style=flat-square&labelColor=gray&logo=windowsxp)](https://developers.arcgis.com/net/wpf/sample-code/) [![Link: WinUI](https://img.shields.io/badge/WinUI-0E53BD?style=flat-square&labelColor=gray&logo=windows)](https://developers.arcgis.com/net/winui/sample-code/) [![Link: UWP](https://img.shields.io/badge/UWP-(Legacy)-202020?style=flat-square&labelColor=gray&logo=windows)](https://developers.arcgis.com/net/uwp/sample-code/) -[![Link: Xamarin.Android](https://img.shields.io/badge/Xamarin.Android-(Legacy)-202020?style=flat-square&labelColor=gray&logo=android)](https://developers.arcgis.com/net/android/sample-code/) -[![Link: Xamarin.iOS](https://img.shields.io/badge/Xamarin.iOS-(Legacy)-202020?style=flat-square&labelColor=gray&logo=ios)](https://developers.arcgis.com/net/ios/sample-code/) - -> **NOTE**: Samples exist but are no longer being updated for iOS, Android, and UWP. If a sample doesn't exist on your desired platform, you can refer to the implementation on Xamarin.Forms for mobile or WPF for Windows desktop. +[![Link: .NET MAUI](https://img.shields.io/badge/MAUI-512BD4?style=square&labelColor=gray&logo=dotnet)](https://developers.arcgis.com/net/maui/sample-code/) ### Build the samples locally If you want to modify or debug sample code, you can clone this repo and load one of the following solutions: -- All: `src\ArcGISRuntime.Viewers.All.sln` -- Windows ( WPF / UWP ): `src\ArcGISRuntime.Viewers.Windows.sln` -- Xamarin (iOS, Android, Forms): `src\ArcGISRuntime.Viewers.Xamarin.sln` +- All: `src\ArcGIS.Viewers.All.sln` +- .NET MAUI (iOS, Android): `src\MAUI\ArcGIS.Samples.Maui.sln` If you are only interested in one platform, you can open a platform-specific solutions: -- [WPF (.NET Framework)](src/WPF/readme.md): `src\WPF\ArcGISRuntime.WPF.Viewer.NetFramework.sln` -- [WPF (.NET 6)](src/WPF/readme.md): `src\WPF\ArcGISRuntime.WPF.Viewer.Net.sln` -- [Xamarin.Forms](src/Forms/readme.md): `src\Windows\ArcGISRuntime.Xamarin.Samples.Forms.sln` -- [WinUI](src/WinUI/readme.md): `\src\WinUI\ArcGISRuntime.WinUI.Viewer.sln (Preview)` +- [WPF (.NET Framework)](src/WPF/readme.md): `src\WPF\WPF.Viewer.NetFramework.sln` +- [WPF (.NET 6)](src/WPF/readme.md): `src\WPF\WPF.Viewer.Net.sln` +- [.NET MAUI](src/MAUI/readme.md): 'src\MAUI\ArcGIS.Samples.Maui.sln' +- [WinUI](src/WinUI/readme.md): `\src\WinUI\ArcGIS.WinUI.Viewer.sln (Preview)` The following platforms are being kept for reference, but no new sample implementations are being added: -- [UWP](src/UWP/readme.md): `src\Windows\ArcGISRuntime.UWP.Viewer.sln` -- [Xamarin.Android](src/Android/readme.md): `src\Android\ArcGISRuntime.Xamarin.Samples.Android.sln` -- [Xamarin.iOS](src/iOS/readme.md): `src\iOS\ArcGISRuntime.Xamari.Samples.iOS.sln` +- [UWP](src/UWP/readme.md): `src\Windows\ArcGIS.UWP.Viewer.sln` ## Notes > **IMPORTANT** When you run the samples, you will need to provide an API key. You can get a free developer account and key on the [ArcGIS Developers website](developers.arcgis.com). For more information see https://links.esri.com/arcgis-runtime-security-auth. -- The .NET sample viewers have a prompt for setting an API key. You can also hardcode your API key in the [`GetLocalKey() method`](https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/main/src/ArcGISRuntime.Samples.Shared/Managers/ApiKeyManager.cs#L89) of the [`ApiKeyManager class`](https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/main/src/ArcGISRuntime.Samples.Shared/Managers/ApiKeyManager.cs). +- The .NET sample viewers have a prompt for setting an API key. You can also hardcode your API key in the [`GetLocalKey() method`](https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/main/src/ArcGIS.Samples.Shared/Managers/ApiKeyManager.cs#L89) of the [`ApiKeyManager class`](https://github.com/Esri/arcgis-runtime-samples-dotnet/tree/main/src/ArcGIS.Samples.Shared/Managers/ApiKeyManager.cs). - Before using WinUI, install the [latest Windows SDK](https://developer.microsoft.com/en-us/windows/downloads/windows-sdk/) and the [vsix plugin](https://aka.ms/windowsappsdk/stable-vsix-2022-cs). - When compiling Universal Windows Platform samples, make sure that you are compiling against x86/x64/ARM platform and not using AnyCPU. @@ -75,7 +68,7 @@ See the [contribution guidelines](https://github.com/Esri/arcgis-runtime-samples ### Requirements -[Supported system configurations for ArcGIS Runtime API for .NET](https://developers.arcgis.com/net/reference/system-requirements/) +[Supported system configurations for ArcGIS Maps SDK for .NET](https://developers.arcgis.com/net/reference/system-requirements/) ### Tools diff --git a/src/Android/ArcGISRuntime.Xamarin.Samples.Android.sln b/src/Android/ArcGISRuntime.Xamarin.Samples.Android.sln deleted file mode 100644 index 1f199dba6d..0000000000 --- a/src/Android/ArcGISRuntime.Xamarin.Samples.Android.sln +++ /dev/null @@ -1,33 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27130.2027 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArcGISRuntime.Xamarin.Samples.Android", "Xamarin.Android\ArcGISRuntime.Xamarin.Samples.Android.csproj", "{BF0E3CEE-E88E-44E0-80CE-46EDA6CD4B54}" -EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ArcGISRuntime.Samples.Shared", "..\ArcGISRuntime.Samples.Shared\ArcGISRuntime.Samples.Shared.shproj", "{0AD85845-0BA1-4DC9-8C32-E6FD7632E32D}" -EndProject -Global - GlobalSection(SharedMSBuildProjectFiles) = preSolution - ..\ArcGISRuntime.Samples.Shared\ArcGISRuntime.Samples.Shared.projitems*{0ad85845-0ba1-4dc9-8c32-e6fd7632e32d}*SharedItemsImports = 13 - ..\ArcGISRuntime.Samples.Shared\ArcGISRuntime.Samples.Shared.projitems*{bf0e3cee-e88e-44e0-80ce-46eda6cd4b54}*SharedItemsImports = 4 - EndGlobalSection - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {BF0E3CEE-E88E-44E0-80CE-46EDA6CD4B54}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BF0E3CEE-E88E-44E0-80CE-46EDA6CD4B54}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BF0E3CEE-E88E-44E0-80CE-46EDA6CD4B54}.Debug|Any CPU.Deploy.0 = Debug|Any CPU - {BF0E3CEE-E88E-44E0-80CE-46EDA6CD4B54}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BF0E3CEE-E88E-44E0-80CE-46EDA6CD4B54}.Release|Any CPU.Build.0 = Release|Any CPU - {BF0E3CEE-E88E-44E0-80CE-46EDA6CD4B54}.Release|Any CPU.Deploy.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F57C10C5-CCBA-480C-BF8E-3FAF85C0380C} - EndGlobalSection -EndGlobal diff --git a/src/Android/Xamarin.Android/ApiKeyPrompt.cs b/src/Android/Xamarin.Android/ApiKeyPrompt.cs deleted file mode 100644 index 2393f91b88..0000000000 --- a/src/Android/Xamarin.Android/ApiKeyPrompt.cs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2021 Esri. -// -// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. -// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific -// language governing permissions and limitations under the License. - -using Android.App; -using Android.OS; -using Android.Text.Method; -using Android.Widget; -using ArcGISRuntime.Samples.Shared.Managers; -using System; -using System.Threading.Tasks; - -namespace ArcGISRuntime -{ - [Activity(Label = "ApiKeyPrompt")] - public class ApiKeyPrompt : Activity - { - private Button _setKeyButton; - private Button _deleteKeyButton; - - private TextView _currentKeyText; - private TextView _statusText; - - private EditText _keyEntry; - - protected override void OnCreate(Bundle savedInstanceState) - { - base.OnCreate(savedInstanceState); - - // Setup the UI. - SetContentView(Resource.Layout.ApiKeyPrompt); - - var linkTextView = FindViewById(Resource.Id.ApiKeyInstructions); - linkTextView.MovementMethod = LinkMovementMethod.Instance; - - _setKeyButton = FindViewById