diff --git a/samples/.vscode/launch.json b/samples/.vscode/launch.json new file mode 100644 index 0000000..b79b4b6 --- /dev/null +++ b/samples/.vscode/launch.json @@ -0,0 +1,44 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Plugin (Android) (Debug)", + "type": "maui", + "request": "launch", + "configuration": "Debug", + "targetFramework": "net8.0-android", + "project": "${workspaceRoot}/Plugin.Maui.Handlers.Sample/Plugin.Maui.Handlers.Sample.csproj", + "preLaunchTask": "maui: Build" + }, + { + "name": "Plugin (iOS) (Debug)", + "type": "maui", + "request": "launch", + "configuration": "Debug", + "targetFramework": "net8.0-ios", + "project": "${workspaceRoot}/Plugin.Maui.Handlers.Sample/Plugin.Maui.Handlers.Sample.csproj", + "preLaunchTask": "maui: Build" + }, + { + "name": "Plugin (macOS) (Debug)", + "type": "maui", + "request": "launch", + "configuration": "Debug", + "targetFramework": "net8.0-maccatalyst", + "project": "${workspaceRoot}/Plugin.Maui.Handlers.Sample/Plugin.Maui.Handlers.Sample.csproj", + "preLaunchTask": "maui: Build" + }, + { + "name": "Plugin (Windows) (Debug)", + "type": "maui", + "request": "launch", + "configuration": "Debug", + "targetFramework": "net8.0-windows10.0.19041.0", + "project": "${workspaceRoot}/Plugin.Maui.Handlers.Sample/Plugin.Maui.Handlers.Sample.csproj", + "preLaunchTask": "maui: Build" + }, + ] +} \ No newline at end of file diff --git a/samples/Plugin.Maui.Feature.Sample/MainPage.xaml b/samples/Plugin.Maui.Feature.Sample/MainPage.xaml deleted file mode 100644 index 0035452..0000000 --- a/samples/Plugin.Maui.Feature.Sample/MainPage.xaml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - diff --git a/samples/Plugin.Maui.Feature.Sample/MainPage.xaml.cs b/samples/Plugin.Maui.Feature.Sample/MainPage.xaml.cs deleted file mode 100644 index 08cdc23..0000000 --- a/samples/Plugin.Maui.Feature.Sample/MainPage.xaml.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Plugin.Maui.Feature; - -namespace Plugin.Maui.Feature.Sample; - -public partial class MainPage : ContentPage -{ - readonly IFeature feature; - - public MainPage(IFeature feature) - { - InitializeComponent(); - - this.feature = feature; - } -} diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Tizen/Main.cs b/samples/Plugin.Maui.Feature.Sample/Platforms/Tizen/Main.cs deleted file mode 100644 index 0481c1e..0000000 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/Tizen/Main.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using Microsoft.Maui; -using Microsoft.Maui.Hosting; - -namespace Plugin.Maui.Feature.Sample; - -class Program : MauiApplication -{ - protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); - - static void Main(string[] args) - { - var app = new Program(); - app.Run(args); - } -} - diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Tizen/tizen-manifest.xml b/samples/Plugin.Maui.Feature.Sample/Platforms/Tizen/tizen-manifest.xml deleted file mode 100644 index 98d30bc..0000000 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/Tizen/tizen-manifest.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - maui-appicon-placeholder - - - - - http://tizen.org/privilege/internet - - - - diff --git a/samples/Plugin.Maui.Feature.Sample.sln b/samples/Plugin.Maui.Handlers.Sample.sln similarity index 87% rename from samples/Plugin.Maui.Feature.Sample.sln rename to samples/Plugin.Maui.Handlers.Sample.sln index a3c263d..23ca5e3 100644 --- a/samples/Plugin.Maui.Feature.Sample.sln +++ b/samples/Plugin.Maui.Handlers.Sample.sln @@ -2,9 +2,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31611.283 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin.Maui.Feature.Sample", "Plugin.Maui.Feature.Sample\Plugin.Maui.Feature.Sample.csproj", "{490BB138-9606-4FFF-8AAD-841C5B1ED059}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin.Maui.Handlers.Sample", "Plugin.Maui.Handlers.Sample\Plugin.Maui.Handlers.Sample.csproj", "{490BB138-9606-4FFF-8AAD-841C5B1ED059}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin.Maui.Feature", "..\src\Plugin.Maui.Feature\Plugin.Maui.Feature.csproj", "{B60F3174-E978-4F2B-B117-F6F0327594C8}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Plugin.Maui.Handlers", "..\src\Plugin.Maui.Handlers\Plugin.Maui.Handlers.csproj", "{B60F3174-E978-4F2B-B117-F6F0327594C8}" EndProject Global diff --git a/samples/Plugin.Maui.Feature.Sample/App.xaml b/samples/Plugin.Maui.Handlers.Sample/App.xaml similarity index 91% rename from samples/Plugin.Maui.Feature.Sample/App.xaml rename to samples/Plugin.Maui.Handlers.Sample/App.xaml index b7f96df..1699cd7 100644 --- a/samples/Plugin.Maui.Feature.Sample/App.xaml +++ b/samples/Plugin.Maui.Handlers.Sample/App.xaml @@ -1,7 +1,7 @@  + x:Class="Plugin.Maui.Handlers.Sample.App"> diff --git a/samples/Plugin.Maui.Feature.Sample/App.xaml.cs b/samples/Plugin.Maui.Handlers.Sample/App.xaml.cs similarity index 73% rename from samples/Plugin.Maui.Feature.Sample/App.xaml.cs rename to samples/Plugin.Maui.Handlers.Sample/App.xaml.cs index 18fadfc..1df10f7 100644 --- a/samples/Plugin.Maui.Feature.Sample/App.xaml.cs +++ b/samples/Plugin.Maui.Handlers.Sample/App.xaml.cs @@ -1,4 +1,4 @@ -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; public partial class App : Application { diff --git a/samples/Plugin.Maui.Feature.Sample/AppShell.xaml b/samples/Plugin.Maui.Handlers.Sample/AppShell.xaml similarity index 67% rename from samples/Plugin.Maui.Feature.Sample/AppShell.xaml rename to samples/Plugin.Maui.Handlers.Sample/AppShell.xaml index 555d41a..1a7a3f8 100644 --- a/samples/Plugin.Maui.Feature.Sample/AppShell.xaml +++ b/samples/Plugin.Maui.Handlers.Sample/AppShell.xaml @@ -1,13 +1,13 @@  diff --git a/samples/Plugin.Maui.Feature.Sample/AppShell.xaml.cs b/samples/Plugin.Maui.Handlers.Sample/AppShell.xaml.cs similarity index 68% rename from samples/Plugin.Maui.Feature.Sample/AppShell.xaml.cs rename to samples/Plugin.Maui.Handlers.Sample/AppShell.xaml.cs index e4633fd..5a0aa2b 100644 --- a/samples/Plugin.Maui.Feature.Sample/AppShell.xaml.cs +++ b/samples/Plugin.Maui.Handlers.Sample/AppShell.xaml.cs @@ -1,4 +1,4 @@ -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; public partial class AppShell : Shell { diff --git a/samples/Plugin.Maui.Handlers.Sample/MainPage.xaml b/samples/Plugin.Maui.Handlers.Sample/MainPage.xaml new file mode 100644 index 0000000..be15319 --- /dev/null +++ b/samples/Plugin.Maui.Handlers.Sample/MainPage.xaml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + Baboon + Capuchin Monkey + Blue Monkey + Squirrel Monkey + Golden Lion Tamarin + Howler Monkey + Japanese Macaque + + + + + + + diff --git a/samples/Plugin.Maui.Handlers.Sample/MainPage.xaml.cs b/samples/Plugin.Maui.Handlers.Sample/MainPage.xaml.cs new file mode 100644 index 0000000..7dcf55d --- /dev/null +++ b/samples/Plugin.Maui.Handlers.Sample/MainPage.xaml.cs @@ -0,0 +1,9 @@ +namespace Plugin.Maui.Handlers.Sample; + +public partial class MainPage : ContentPage +{ + public MainPage() + { + InitializeComponent(); + } +} diff --git a/samples/Plugin.Maui.Feature.Sample/MauiProgram.cs b/samples/Plugin.Maui.Handlers.Sample/MauiProgram.cs similarity index 67% rename from samples/Plugin.Maui.Feature.Sample/MauiProgram.cs rename to samples/Plugin.Maui.Handlers.Sample/MauiProgram.cs index 3e033d7..8772f34 100644 --- a/samples/Plugin.Maui.Feature.Sample/MauiProgram.cs +++ b/samples/Plugin.Maui.Handlers.Sample/MauiProgram.cs @@ -1,7 +1,7 @@ using Microsoft.Extensions.DependencyInjection; -using Plugin.Maui.Feature; +using Plugin.Maui.Handlers; -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; public static class MauiProgram { @@ -17,7 +17,12 @@ public static MauiApp CreateMauiApp() }); builder.Services.AddTransient(); - builder.Services.AddSingleton(Feature.Default); + + EntryHandler.RemoveBorders(); + EntryHandler.AddDone(Color.FromArgb("#000000")); + + EditorHandler.EnableScrolling(); + EditorHandler.AddDone(null); return builder.Build(); } diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Android/AndroidManifest.xml b/samples/Plugin.Maui.Handlers.Sample/Platforms/Android/AndroidManifest.xml similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Android/AndroidManifest.xml rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Android/AndroidManifest.xml diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Android/MainActivity.cs b/samples/Plugin.Maui.Handlers.Sample/Platforms/Android/MainActivity.cs similarity index 90% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Android/MainActivity.cs rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Android/MainActivity.cs index 1228e53..268186a 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/Android/MainActivity.cs +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/Android/MainActivity.cs @@ -2,7 +2,7 @@ using Android.Content.PM; using Android.OS; -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)] public class MainActivity : MauiAppCompatActivity diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Android/MainApplication.cs b/samples/Plugin.Maui.Handlers.Sample/Platforms/Android/MainApplication.cs similarity index 88% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Android/MainApplication.cs rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Android/MainApplication.cs index d26515c..18182ca 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/Android/MainApplication.cs +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/Android/MainApplication.cs @@ -1,7 +1,7 @@ using Android.App; using Android.Runtime; -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; [Application] public class MainApplication : MauiApplication diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Android/Resources/values/colors.xml b/samples/Plugin.Maui.Handlers.Sample/Platforms/Android/Resources/values/colors.xml similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Android/Resources/values/colors.xml rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Android/Resources/values/colors.xml diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/iOS/AppDelegate.cs b/samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/AppDelegate.cs similarity index 82% rename from samples/Plugin.Maui.Feature.Sample/Platforms/iOS/AppDelegate.cs rename to samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/AppDelegate.cs index f8d3106..05531d1 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/iOS/AppDelegate.cs +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/AppDelegate.cs @@ -1,6 +1,6 @@ using Foundation; -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; [Register("AppDelegate")] public class AppDelegate : MauiUIApplicationDelegate diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/Info.plist b/samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/Info.plist similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/Info.plist rename to samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/Info.plist diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/Program.cs b/samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/Program.cs similarity index 89% rename from samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/Program.cs rename to samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/Program.cs index defc92d..e3892f4 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/Program.cs +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/MacCatalyst/Program.cs @@ -1,7 +1,7 @@ using ObjCRuntime; using UIKit; -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; public class Program { diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Windows/App.xaml b/samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/App.xaml similarity index 67% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Windows/App.xaml rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/App.xaml index 3209016..ea4b12d 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/Windows/App.xaml +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/App.xaml @@ -1,9 +1,9 @@  + xmlns:local="using:Plugin.Maui.Handlers.Sample.WinUI"> diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Windows/App.xaml.cs b/samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/App.xaml.cs similarity index 93% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Windows/App.xaml.cs rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/App.xaml.cs index 3b6e823..170b0ba 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/Windows/App.xaml.cs +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/App.xaml.cs @@ -3,7 +3,7 @@ // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. -namespace Plugin.Maui.Feature.Sample.WinUI; +namespace Plugin.Maui.Handlers.Sample.WinUI; /// /// Provides application-specific behavior to supplement the default Application class. diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Windows/Package.appxmanifest b/samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/Package.appxmanifest similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Windows/Package.appxmanifest rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/Package.appxmanifest diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/Windows/app.manifest b/samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/app.manifest similarity index 88% rename from samples/Plugin.Maui.Feature.Sample/Platforms/Windows/app.manifest rename to samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/app.manifest index 49f3587..5f90845 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/Windows/app.manifest +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/Windows/app.manifest @@ -1,6 +1,6 @@  - + diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/AppDelegate.cs b/samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/AppDelegate.cs similarity index 82% rename from samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/AppDelegate.cs rename to samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/AppDelegate.cs index f8d3106..05531d1 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/MacCatalyst/AppDelegate.cs +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/AppDelegate.cs @@ -1,6 +1,6 @@ using Foundation; -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; [Register("AppDelegate")] public class AppDelegate : MauiUIApplicationDelegate diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/iOS/Info.plist b/samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/Info.plist similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Platforms/iOS/Info.plist rename to samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/Info.plist diff --git a/samples/Plugin.Maui.Feature.Sample/Platforms/iOS/Program.cs b/samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/Program.cs similarity index 89% rename from samples/Plugin.Maui.Feature.Sample/Platforms/iOS/Program.cs rename to samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/Program.cs index defc92d..e3892f4 100644 --- a/samples/Plugin.Maui.Feature.Sample/Platforms/iOS/Program.cs +++ b/samples/Plugin.Maui.Handlers.Sample/Platforms/iOS/Program.cs @@ -1,7 +1,7 @@ using ObjCRuntime; using UIKit; -namespace Plugin.Maui.Feature.Sample; +namespace Plugin.Maui.Handlers.Sample; public class Program { diff --git a/samples/Plugin.Maui.Feature.Sample/Plugin.Maui.Feature.Sample.csproj b/samples/Plugin.Maui.Handlers.Sample/Plugin.Maui.Handlers.Sample.csproj similarity index 74% rename from samples/Plugin.Maui.Feature.Sample/Plugin.Maui.Feature.Sample.csproj rename to samples/Plugin.Maui.Handlers.Sample/Plugin.Maui.Handlers.Sample.csproj index 28e5ae8..2602d0e 100644 --- a/samples/Plugin.Maui.Feature.Sample/Plugin.Maui.Feature.Sample.csproj +++ b/samples/Plugin.Maui.Handlers.Sample/Plugin.Maui.Handlers.Sample.csproj @@ -3,21 +3,23 @@ net8.0-android;net8.0-ios;net8.0-maccatalyst $(TargetFrameworks);net8.0-windows10.0.19041.0 - - Exe - Plugin.Maui.Feature.Sample + Plugin.Maui.Handlers.Sample true true enable + 8.0.14 - Plugin.Maui.Feature.Sample + Plugin Handlers com.companyname.pluginsample A20E30BB-3BF7-4ACB-89F2-596834136909 + + true + 1.0 1 @@ -27,7 +29,11 @@ 21.0 10.0.17763.0 10.0.17763.0 - 6.5 + + + + None + false @@ -48,7 +54,10 @@ - - + + + + + diff --git a/samples/Plugin.Maui.Feature.Sample/Properties/launchSettings.json b/samples/Plugin.Maui.Handlers.Sample/Properties/launchSettings.json similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Properties/launchSettings.json rename to samples/Plugin.Maui.Handlers.Sample/Properties/launchSettings.json diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/AppIcon/appicon.svg b/samples/Plugin.Maui.Handlers.Sample/Resources/AppIcon/appicon.svg similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/AppIcon/appicon.svg rename to samples/Plugin.Maui.Handlers.Sample/Resources/AppIcon/appicon.svg diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/AppIcon/appiconfg.svg b/samples/Plugin.Maui.Handlers.Sample/Resources/AppIcon/appiconfg.svg similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/AppIcon/appiconfg.svg rename to samples/Plugin.Maui.Handlers.Sample/Resources/AppIcon/appiconfg.svg diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/Fonts/OpenSans-Regular.ttf b/samples/Plugin.Maui.Handlers.Sample/Resources/Fonts/OpenSans-Regular.ttf similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/Fonts/OpenSans-Regular.ttf rename to samples/Plugin.Maui.Handlers.Sample/Resources/Fonts/OpenSans-Regular.ttf diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/Fonts/OpenSans-Semibold.ttf b/samples/Plugin.Maui.Handlers.Sample/Resources/Fonts/OpenSans-Semibold.ttf similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/Fonts/OpenSans-Semibold.ttf rename to samples/Plugin.Maui.Handlers.Sample/Resources/Fonts/OpenSans-Semibold.ttf diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/Raw/AboutAssets.txt b/samples/Plugin.Maui.Handlers.Sample/Resources/Raw/AboutAssets.txt similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/Raw/AboutAssets.txt rename to samples/Plugin.Maui.Handlers.Sample/Resources/Raw/AboutAssets.txt diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/Splash/splash.svg b/samples/Plugin.Maui.Handlers.Sample/Resources/Splash/splash.svg similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/Splash/splash.svg rename to samples/Plugin.Maui.Handlers.Sample/Resources/Splash/splash.svg diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/Styles/Colors.xaml b/samples/Plugin.Maui.Handlers.Sample/Resources/Styles/Colors.xaml similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/Styles/Colors.xaml rename to samples/Plugin.Maui.Handlers.Sample/Resources/Styles/Colors.xaml diff --git a/samples/Plugin.Maui.Feature.Sample/Resources/Styles/Styles.xaml b/samples/Plugin.Maui.Handlers.Sample/Resources/Styles/Styles.xaml similarity index 100% rename from samples/Plugin.Maui.Feature.Sample/Resources/Styles/Styles.xaml rename to samples/Plugin.Maui.Handlers.Sample/Resources/Styles/Styles.xaml diff --git a/src/Plugin.Maui.Feature/Feature.android.cs b/src/Plugin.Maui.Feature/Feature.android.cs deleted file mode 100644 index 07e3d71..0000000 --- a/src/Plugin.Maui.Feature/Feature.android.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Plugin.Maui.Feature; - -partial class FeatureImplementation : IFeature -{ - // TODO Implement your Android specific code -} \ No newline at end of file diff --git a/src/Plugin.Maui.Feature/Feature.macios.cs b/src/Plugin.Maui.Feature/Feature.macios.cs deleted file mode 100644 index 322135d..0000000 --- a/src/Plugin.Maui.Feature/Feature.macios.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Plugin.Maui.Feature; - -partial class FeatureImplementation : IFeature -{ - // TODO Implement your macOS/iOS specific code -} \ No newline at end of file diff --git a/src/Plugin.Maui.Feature/Feature.shared.cs b/src/Plugin.Maui.Feature/Feature.shared.cs deleted file mode 100644 index ffffda1..0000000 --- a/src/Plugin.Maui.Feature/Feature.shared.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace Plugin.Maui.Feature; - -public static class Feature -{ - static IFeature? defaultImplementation; - - /// - /// Provides the default implementation for static usage of this API. - /// - public static IFeature Default => - defaultImplementation ??= new FeatureImplementation(); - - internal static void SetDefault(IFeature? implementation) => - defaultImplementation = implementation; -} diff --git a/src/Plugin.Maui.Feature/Feature.windows.cs b/src/Plugin.Maui.Feature/Feature.windows.cs deleted file mode 100644 index 3c2edd2..0000000 --- a/src/Plugin.Maui.Feature/Feature.windows.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Plugin.Maui.Feature; - -partial class FeatureImplementation : IFeature -{ - // TODO Implement your Windows specific code -} \ No newline at end of file diff --git a/src/Plugin.Maui.Feature/IFeature.cs b/src/Plugin.Maui.Feature/IFeature.cs deleted file mode 100644 index 3faf41b..0000000 --- a/src/Plugin.Maui.Feature/IFeature.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Plugin.Maui.Feature; - -/// -/// TODO: Provide relevant comments for your APIs -/// -public interface IFeature -{ - // TODO Define your plugin interface -} \ No newline at end of file diff --git a/src/Plugin.Maui.Feature.sln b/src/Plugin.Maui.Handlers.sln similarity index 100% rename from src/Plugin.Maui.Feature.sln rename to src/Plugin.Maui.Handlers.sln diff --git a/src/Plugin.Maui.Handlers/EditorHandler/Editor.shared.cs b/src/Plugin.Maui.Handlers/EditorHandler/Editor.shared.cs new file mode 100644 index 0000000..3e64135 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EditorHandler/Editor.shared.cs @@ -0,0 +1,6 @@ +namespace Plugin.Maui.Handlers; + +public partial class EditorHandler +{ + +} diff --git a/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.android.cs b/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.android.cs new file mode 100644 index 0000000..e2b6a76 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.android.cs @@ -0,0 +1,29 @@ +namespace Plugin.Maui.Handlers; + +partial class EditorHandler +{ + /// + /// Removes the borders of the control + /// + public static void EnableScrolling() + { + Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("Scrolling", (handler, view) => + { + + }); + } + + /// + /// Adds a Done button to the control + /// toolbarBackgroundColor The color of the toolbar background + /// + public static void AddDone(Color toolbarBackgroundColor) + { + toolbarBackgroundColor ??= Color.FromArgb("#FFFFFF"); + + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Done", (handler, view) => + { + + }); + } +} \ No newline at end of file diff --git a/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.macios.cs b/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.macios.cs new file mode 100644 index 0000000..3f4e7c2 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.macios.cs @@ -0,0 +1,53 @@ +using Microsoft.Maui; +using Microsoft.Maui.Platform; +using System.Drawing; +using Color = Microsoft.Maui.Graphics.Color; + +using UIKit; +using Foundation; + +namespace Plugin.Maui.Handlers; + +partial class EditorHandler +{ + /// + /// Enables the scrolling of the control + /// + public static void EnableScrolling() + { + Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("Scrolling", (handler, view) => + { + handler.PlatformView.ScrollEnabled = true; + handler.PlatformView.UserInteractionEnabled = true; + }); + } + + /// + /// Adds a Done button to the control + /// toolbarBackgroundColor The color of the toolbar background + /// + public static void AddDone(Color toolbarBackgroundColor) + { + toolbarBackgroundColor ??= Color.FromArgb("#FFFFFF"); + + Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("Done", (handler, view) => + { + var toolbar = new UIToolbar(new RectangleF(0.0f, 0.0f, 50.0f, 44.0f)) + { + BackgroundColor = toolbarBackgroundColor.ToPlatform() + }; + + var doneButton = new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate + { + handler.PlatformView.ResignFirstResponder(); + }); + + toolbar.Items = new UIBarButtonItem[] { + new (UIBarButtonSystemItem.FlexibleSpace), + doneButton + }; + + handler.PlatformView.InputAccessoryView = toolbar; + }); + } +} \ No newline at end of file diff --git a/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.windows.cs b/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.windows.cs new file mode 100644 index 0000000..9f5b501 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EditorHandler/EditorHandler.windows.cs @@ -0,0 +1,29 @@ +namespace Plugin.Maui.Handlers; + +partial class EditorHandler +{ + /// + /// Removes the borders of the control + /// + public static void EnableScrolling() + { + Microsoft.Maui.Handlers.EditorHandler.Mapper.AppendToMapping("Scrolling", (handler, view) => + { + + }); + } + + /// + /// Adds a Done button to the control + /// toolbarBackgroundColor The color of the toolbar background + /// + public static void AddDone(Color toolbarBackgroundColor) + { + toolbarBackgroundColor ??= Color.FromArgb("#FFFFFF"); + + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Done", (handler, view) => + { + + }); + } +} \ No newline at end of file diff --git a/src/Plugin.Maui.Feature/Feature.net.cs b/src/Plugin.Maui.Handlers/EditorHandler/EntryHandler.net.cs similarity index 68% rename from src/Plugin.Maui.Feature/Feature.net.cs rename to src/Plugin.Maui.Handlers/EditorHandler/EntryHandler.net.cs index 90b504c..072d495 100644 --- a/src/Plugin.Maui.Feature/Feature.net.cs +++ b/src/Plugin.Maui.Handlers/EditorHandler/EntryHandler.net.cs @@ -1,6 +1,6 @@ -namespace Plugin.Maui.Feature; +namespace Plugin.Maui.Handlers; -partial class FeatureImplementation : IFeature +partial class EntryHandler { // TODO Implement your .NET specific code. // This usually is a placeholder as .NET MAUI apps typically don't run on .NET generic targets unless through unit tests and such diff --git a/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.android.cs b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.android.cs new file mode 100644 index 0000000..d54bf87 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.android.cs @@ -0,0 +1,29 @@ +namespace Plugin.Maui.Handlers; + +partial class EntryHandler +{ + /// + /// Removes the borders of the control + /// + public static void RemoveBorders() + { + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Borderless", (handler, view) => + { + + }); + } + + /// + /// Adds a Done button to the control + /// toolbarBackgroundColor The color of the toolbar background + /// + public static void AddDone(Color toolbarBackgroundColor) + { + toolbarBackgroundColor ??= Color.FromArgb("#FFFFFF"); + + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Done", (handler, view) => + { + + }); + } +} \ No newline at end of file diff --git a/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.macios.cs b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.macios.cs new file mode 100644 index 0000000..35a7a99 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.macios.cs @@ -0,0 +1,53 @@ +using Microsoft.Maui; +using Microsoft.Maui.Platform; +using System.Drawing; +using Color = Microsoft.Maui.Graphics.Color; + +using UIKit; +using Foundation; + +namespace Plugin.Maui.Handlers; + +partial class EntryHandler +{ + /// + /// Removes the borders of the control + /// + public static void RemoveBorders() + { + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Borderless", (handler, view) => + { + handler.PlatformView.Layer.BorderWidth = 0; + handler.PlatformView.BorderStyle = UITextBorderStyle.None; + }); + } + + /// + /// Adds a Done button to the control + /// toolbarBackgroundColor The color of the toolbar background + /// + public static void AddDone(Color toolbarBackgroundColor) + { + toolbarBackgroundColor ??= Color.FromArgb("#FFFFFF"); + + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Done", (handler, view) => + { + var toolbar = new UIToolbar(new RectangleF(0.0f, 0.0f, 50.0f, 44.0f)) + { + BackgroundColor = toolbarBackgroundColor.ToPlatform() + }; + + var doneButton = new UIBarButtonItem(UIBarButtonSystemItem.Done, delegate + { + handler.PlatformView.ResignFirstResponder(); + }); + + toolbar.Items = new UIBarButtonItem[] { + new (UIBarButtonSystemItem.FlexibleSpace), + doneButton + }; + + handler.PlatformView.InputAccessoryView = toolbar; + }); + } +} \ No newline at end of file diff --git a/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.net.cs b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.net.cs new file mode 100644 index 0000000..072d495 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.net.cs @@ -0,0 +1,7 @@ +namespace Plugin.Maui.Handlers; + +partial class EntryHandler +{ + // TODO Implement your .NET specific code. + // This usually is a placeholder as .NET MAUI apps typically don't run on .NET generic targets unless through unit tests and such +} \ No newline at end of file diff --git a/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.windows.cs b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.windows.cs new file mode 100644 index 0000000..d54bf87 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EntryHandler/EntryHandler.windows.cs @@ -0,0 +1,29 @@ +namespace Plugin.Maui.Handlers; + +partial class EntryHandler +{ + /// + /// Removes the borders of the control + /// + public static void RemoveBorders() + { + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Borderless", (handler, view) => + { + + }); + } + + /// + /// Adds a Done button to the control + /// toolbarBackgroundColor The color of the toolbar background + /// + public static void AddDone(Color toolbarBackgroundColor) + { + toolbarBackgroundColor ??= Color.FromArgb("#FFFFFF"); + + Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("Done", (handler, view) => + { + + }); + } +} \ No newline at end of file diff --git a/src/Plugin.Maui.Handlers/EntryHandler/Handler.shared.cs b/src/Plugin.Maui.Handlers/EntryHandler/Handler.shared.cs new file mode 100644 index 0000000..6ba0c92 --- /dev/null +++ b/src/Plugin.Maui.Handlers/EntryHandler/Handler.shared.cs @@ -0,0 +1,6 @@ +namespace Plugin.Maui.Handlers; + +public partial class EntryHandler +{ + +} diff --git a/src/Plugin.Maui.Feature/Plugin.Maui.Feature.csproj b/src/Plugin.Maui.Handlers/Plugin.Maui.Handlers.csproj similarity index 80% rename from src/Plugin.Maui.Feature/Plugin.Maui.Feature.csproj rename to src/Plugin.Maui.Handlers/Plugin.Maui.Handlers.csproj index a9abe42..550afed 100644 --- a/src/Plugin.Maui.Feature/Plugin.Maui.Feature.csproj +++ b/src/Plugin.Maui.Handlers/Plugin.Maui.Handlers.csproj @@ -8,6 +8,7 @@ enable enable true + 8.0.14 14.2 14.0 @@ -17,19 +18,19 @@ 6.5 - author - Copyright © author and contributors + Victor Hugo Garcia Hernandez + Copyright © Victor Hugo Garcia Hernandez True - https://github.com/jfversluis/Plugin.Maui.Feature - https://github.com/jfversluis/Plugin.Maui.Feature + https://github.com/vhugogarcia/Plugin.Maui.Handlers + https://github.com/vhugogarcia/Plugin.Maui.Handlers git dotnet-maui;maui;plugin; True true true snupkg - .NET MAUI Feature Plugin - Plugin.Maui.Feature provides the ability to do this amazing thing in your .NET MAUI application. + .NET MAUI Handlers Plugin + Plugin.Maui.Handlers provides common platform overrides in your .NET MAUI application. MIT True portable @@ -38,6 +39,9 @@ + + false + @@ -66,19 +70,28 @@ - + + + + + + - + + + + +