Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vhugogarcia committed May 15, 2024
1 parent cd40b2f commit 736e219
Show file tree
Hide file tree
Showing 54 changed files with 435 additions and 135 deletions.
44 changes: 44 additions & 0 deletions samples/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -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"
},
]
}
8 changes: 0 additions & 8 deletions samples/Plugin.Maui.Feature.Sample/MainPage.xaml

This file was deleted.

15 changes: 0 additions & 15 deletions samples/Plugin.Maui.Feature.Sample/MainPage.xaml.cs

This file was deleted.

17 changes: 0 additions & 17 deletions samples/Plugin.Maui.Feature.Sample/Platforms/Tizen/Main.cs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Plugin.Maui.Feature.Sample.App">
x:Class="Plugin.Maui.Handlers.Sample.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Plugin.Maui.Feature.Sample;
namespace Plugin.Maui.Handlers.Sample;

public partial class App : Application
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Shell
x:Class="Plugin.Maui.Feature.Sample.AppShell"
x:Class="Plugin.Maui.Handlers.Sample.AppShell"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:pages="clr-namespace:Plugin.Maui.Feature.Sample"
xmlns:pages="clr-namespace:Plugin.Maui.Handlers.Sample"
Shell.FlyoutBehavior="Disabled">

<ShellContent
Title="Feature Plugin"
Title="Handlers Plugin"
ContentTemplate="{DataTemplate pages:MainPage}" />

</Shell>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Plugin.Maui.Feature.Sample;
namespace Plugin.Maui.Handlers.Sample;

public partial class AppShell : Shell
{
Expand Down
76 changes: 76 additions & 0 deletions samples/Plugin.Maui.Handlers.Sample/MainPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Plugin.Maui.Handlers.Sample.MainPage"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
ios:Page.UseSafeArea="False"
Padding="20"
BackgroundColor="White"
Title="Plugin Maui Handlers">

<VerticalStackLayout
Spacing="20">
<Border
Stroke="#ededed"
StrokeThickness="4"
Background="#ededed"
Padding="16,8"
HorizontalOptions="Center">
<Border.StrokeShape>
<RoundRectangle CornerRadius="20" />
</Border.StrokeShape>
<Entry
x:Name="entry"
Placeholder="Lorem Ipsum"
BackgroundColor="Transparent"
ClearButtonVisibility="WhileEditing"
TextTransform="Uppercase"
Text="I'm an Entry Control" />
</Border>

<Border
Stroke="#ededed"
StrokeThickness="4"
Background="#ededed"
Padding="16,8"
HorizontalOptions="Center">
<Border.StrokeShape>
<RoundRectangle CornerRadius="20" />
</Border.StrokeShape>
<Editor
x:Name="editor"
BackgroundColor="Transparent"
Placeholder="I'm an Editor Control"
WidthRequest="300"
HeightRequest="150"/>
</Border>

<Border
Stroke="#ededed"
StrokeThickness="4"
Background="#ededed"
Padding="16,8"
HorizontalOptions="Center">
<Border.StrokeShape>
<RoundRectangle CornerRadius="20" />
</Border.StrokeShape>
<Picker
x:Name="picker"
BackgroundColor="Transparent"
Title="I'm a Picker Control">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Baboon</x:String>
<x:String>Capuchin Monkey</x:String>
<x:String>Blue Monkey</x:String>
<x:String>Squirrel Monkey</x:String>
<x:String>Golden Lion Tamarin</x:String>
<x:String>Howler Monkey</x:String>
<x:String>Japanese Macaque</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
</Border>
</VerticalStackLayout>

</ContentPage>
9 changes: 9 additions & 0 deletions samples/Plugin.Maui.Handlers.Sample/MainPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Plugin.Maui.Handlers.Sample;

public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -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
{
Expand All @@ -17,7 +17,12 @@ public static MauiApp CreateMauiApp()
});

builder.Services.AddTransient<MainPage>();
builder.Services.AddSingleton<IFeature>(Feature.Default);

EntryHandler.RemoveBorders();
EntryHandler.AddDone(Color.FromArgb("#000000"));

EditorHandler.EnableScrolling();
EditorHandler.AddDone(null);

return builder.Build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Foundation;

namespace Plugin.Maui.Feature.Sample;
namespace Plugin.Maui.Handlers.Sample;

[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ObjCRuntime;
using UIKit;

namespace Plugin.Maui.Feature.Sample;
namespace Plugin.Maui.Handlers.Sample;

public class Program
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<maui:MauiWinUIApplication
x:Class="Plugin.Maui.Feature.Sample.WinUI.App"
x:Class="Plugin.Maui.Handlers.Sample.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:Plugin.Maui.Feature.Sample.WinUI">
xmlns:local="using:Plugin.Maui.Handlers.Sample.WinUI">

</maui:MauiWinUIApplication>

Original file line number Diff line number Diff line change
Expand Up @@ -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;

/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="Plugin.Maui.Feature.Sample.WinUI.app"/>
<assemblyIdentity version="1.0.0.0" name="Plugin.Maui.Handlers.Sample.WinUI.app"/>

<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Foundation;

namespace Plugin.Maui.Feature.Sample;
namespace Plugin.Maui.Handlers.Sample;

[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using ObjCRuntime;
using UIKit;

namespace Plugin.Maui.Feature.Sample;
namespace Plugin.Maui.Handlers.Sample;

public class Program
{
Expand Down
Loading

0 comments on commit 736e219

Please sign in to comment.