├── images
├── mvp-summit.jpg
├── custom-handler.png
└── custom-renderer.png
├── src
├── Xamarin.Forms
│ ├── Library.Sample
│ │ ├── Library.Sample
│ │ │ ├── AssemblyInfo.cs
│ │ │ ├── App.xaml
│ │ │ ├── MainPage.xaml.cs
│ │ │ ├── App.xaml.cs
│ │ │ ├── Library.Sample.csproj
│ │ │ └── MainPage.xaml
│ │ ├── Library.Sample.iOS
│ │ │ ├── Resources
│ │ │ │ ├── Default.png
│ │ │ │ ├── Default@2x.png
│ │ │ │ ├── Default-568h@2x.png
│ │ │ │ ├── Default-Portrait.png
│ │ │ │ ├── Default-Portrait@2x.png
│ │ │ │ └── LaunchScreen.storyboard
│ │ │ ├── Assets.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ ├── Icon20.png
│ │ │ │ │ ├── Icon29.png
│ │ │ │ │ ├── Icon40.png
│ │ │ │ │ ├── Icon58.png
│ │ │ │ │ ├── Icon60.png
│ │ │ │ │ ├── Icon76.png
│ │ │ │ │ ├── Icon80.png
│ │ │ │ │ ├── Icon87.png
│ │ │ │ │ ├── Icon1024.png
│ │ │ │ │ ├── Icon120.png
│ │ │ │ │ ├── Icon152.png
│ │ │ │ │ ├── Icon167.png
│ │ │ │ │ ├── Icon180.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── Entitlements.plist
│ │ │ ├── Main.cs
│ │ │ ├── AppDelegate.cs
│ │ │ ├── Info.plist
│ │ │ ├── Properties
│ │ │ │ └── AssemblyInfo.cs
│ │ │ └── Library.Sample.iOS.csproj
│ │ └── Library.Sample.Android
│ │ │ ├── Resources
│ │ │ ├── mipmap-hdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── launcher_foreground.png
│ │ │ ├── mipmap-mdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── launcher_foreground.png
│ │ │ ├── mipmap-xhdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── launcher_foreground.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── launcher_foreground.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ │ ├── icon.png
│ │ │ │ └── launcher_foreground.png
│ │ │ ├── mipmap-anydpi-v26
│ │ │ │ ├── icon.xml
│ │ │ │ └── icon_round.xml
│ │ │ ├── values
│ │ │ │ ├── colors.xml
│ │ │ │ └── styles.xml
│ │ │ └── AboutResources.txt
│ │ │ ├── Properties
│ │ │ ├── AndroidManifest.xml
│ │ │ └── AssemblyInfo.cs
│ │ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ │ ├── MainActivity.cs
│ │ │ └── Library.Sample.Android.csproj
│ ├── Library
│ │ ├── Effects
│ │ │ ├── FocusRoutingEffect.shared.cs
│ │ │ ├── FocusRoutingEffectImpl.ios.cs
│ │ │ └── FocusRoutingEffectImpl.android.cs
│ │ ├── Renderers
│ │ │ ├── CharacterSpacingExtensions.android.cs
│ │ │ ├── CustomEntryRenderer.ios.cs
│ │ │ ├── ColorStateListExtensions.android.cs
│ │ │ ├── TextAlignmentExtensions.android.cs
│ │ │ ├── CustomEntry.shared.cs
│ │ │ └── CustomEntryRenderer.android.cs
│ │ ├── Triggers
│ │ │ └── NumericValidationTriggerAction.shared.cs
│ │ ├── Converters
│ │ │ └── IntToBoolConverter.shared.cs
│ │ ├── Behaviors
│ │ │ └── NumericValidationBehavior.shared.cs
│ │ └── Library.csproj
│ └── Library.sln
└── .NET MAUI
│ └── Library
│ ├── Library
│ ├── Effects
│ │ ├── PlatformFocusPlatformEffect.Standard.cs
│ │ └── FocusRoutingEffect.cs
│ ├── Platforms
│ │ ├── Android
│ │ │ ├── CharacterSpacingExtensions.cs
│ │ │ ├── ColorStateListExtensions.cs
│ │ │ ├── TextAlignmentExtensions.cs
│ │ │ ├── CustomEntryExtensions.cs
│ │ │ ├── CustomEntryHandler.cs
│ │ │ └── CustomEntryRenderer.cs
│ │ ├── Windows
│ │ │ ├── CustomEntryRenderer.cs
│ │ │ └── CustomEntryHandler.cs
│ │ ├── iOS
│ │ │ ├── CustomEntryRenderer.cs
│ │ │ └── CustomEntryHandler.cs
│ │ └── MacCatalyst
│ │ │ ├── CustomEntryRenderer.cs
│ │ │ └── CustomEntryHandler.cs
│ ├── Triggers
│ │ └── NumericValidationTriggerAction.cs
│ ├── Converters
│ │ └── IntToBoolConverter.cs
│ ├── Controls
│ │ ├── ICustomEntry.cs
│ │ └── CustomEntry.cs
│ ├── Behaviors
│ │ └── NumericValidationBehavior.cs
│ ├── Handlers
│ │ ├── CustomEntryMapper.Standard.cs
│ │ └── CustomEntryHandler.cs
│ ├── Library.csproj
│ └── Hosting
│ │ └── AppHostBuilderExtensions.cs
│ ├── Library.Sample
│ ├── Properties
│ │ └── launchSettings.json
│ ├── Resources
│ │ ├── Fonts
│ │ │ ├── OpenSans-Regular.ttf
│ │ │ └── OpenSans-Semibold.ttf
│ │ ├── appicon.svg
│ │ ├── Raw
│ │ │ └── AboutAssets.txt
│ │ ├── appiconfg.svg
│ │ ├── Images
│ │ │ └── dotnet_bot.svg
│ │ └── Styles.xaml
│ ├── AppShell.xaml.cs
│ ├── MainPage.xaml.cs
│ ├── App.xaml.cs
│ ├── Platforms
│ │ ├── Android
│ │ │ ├── Resources
│ │ │ │ └── values
│ │ │ │ │ └── colors.xml
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── MainActivity.cs
│ │ │ └── MainApplication.cs
│ │ ├── iOS
│ │ │ ├── AppDelegate.cs
│ │ │ ├── Program.cs
│ │ │ └── Info.plist
│ │ ├── MacCatalyst
│ │ │ ├── AppDelegate.cs
│ │ │ ├── Program.cs
│ │ │ └── Info.plist
│ │ └── Windows
│ │ │ ├── App.xaml
│ │ │ ├── app.manifest
│ │ │ ├── App.xaml.cs
│ │ │ └── Package.appxmanifest
│ ├── App.xaml
│ ├── AppShell.xaml
│ ├── MauiProgram.cs
│ ├── Library.Sample.csproj
│ └── MainPage.xaml
│ ├── Library.sln
│ └── Library.MultiTargeting.targets
├── .gitattributes
└── .gitignore
/images/mvp-summit.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/images/mvp-summit.jpg
--------------------------------------------------------------------------------
/images/custom-handler.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/images/custom-handler.png
--------------------------------------------------------------------------------
/images/custom-renderer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/images/custom-renderer.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms.Xaml;
2 |
3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Effects/PlatformFocusPlatformEffect.Standard.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Effects
2 | {
3 | public class PlatformFocusPlatformEffect
4 | {
5 | }
6 | }
7 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "profiles": {
3 | "Windows Machine": {
4 | "commandName": "MsixPackage",
5 | "nativeDebugging": false
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Resources/Fonts/OpenSans-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/.NET MAUI/Library/Library.Sample/Resources/Fonts/OpenSans-Regular.ttf
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Resources/Fonts/OpenSans-Semibold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/.NET MAUI/Library/Library.Sample/Resources/Fonts/OpenSans-Semibold.ttf
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/AppShell.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Sample
2 | {
3 | public partial class AppShell : Shell
4 | {
5 | public AppShell()
6 | {
7 | InitializeComponent();
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Sample
2 | {
3 | public partial class MainPage : ContentPage
4 | {
5 | public MainPage()
6 | {
7 | InitializeComponent();
8 | }
9 | }
10 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-hdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-hdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-mdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-mdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jsuarezruiz/mvpsummit2022-dotnet-maui/HEAD/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Resources/appicon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Sample
2 | {
3 | public partial class App : Application
4 | {
5 | public App()
6 | {
7 | InitializeComponent();
8 |
9 | MainPage = new AppShell();
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #512BD4
4 | #2B0B98
5 | #2B0B98
6 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Effects/FocusRoutingEffect.shared.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace Library.Effects
4 | {
5 | public class FocusRoutingEffect : RoutingEffect
6 | {
7 | public FocusRoutingEffect() : base("Effects.FocusEffect")
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Library.Sample
4 | {
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/MacCatalyst/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 |
3 | namespace Library.Sample
4 | {
5 | [Register("AppDelegate")]
6 | public class AppDelegate : MauiUIApplicationDelegate
7 | {
8 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
9 | }
10 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #3F51B5
5 | #303F9F
6 | #FF4081
7 |
8 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Android/CharacterSpacingExtensions.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Extensions.Android
2 | {
3 | public static class CharacterSpacingExtensions
4 | {
5 | public const float EmCoefficient = 0.0624f;
6 |
7 | public static float ToEm(this double pt)
8 | {
9 | return (float)pt * EmCoefficient; //Coefficient for converting Pt to Em
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Renderers/CharacterSpacingExtensions.android.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Extensions.Android
2 | {
3 | public static class CharacterSpacingExtensions
4 | {
5 | public const float EmCoefficient = 0.0624f;
6 |
7 | public static float ToEm(this double pt)
8 | {
9 | return (float)pt * EmCoefficient; //Coefficient for converting Pt to Em
10 | }
11 | }
12 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Windows/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Triggers/NumericValidationTriggerAction.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Triggers
2 | {
3 | public class NumericValidationTriggerAction : TriggerAction
4 | {
5 | protected override void Invoke(Entry entry)
6 | {
7 | bool isValid = double.TryParse(entry.Text, out double result);
8 | entry.TextColor = isValid ? Colors.Black : Colors.Red;
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Triggers/NumericValidationTriggerAction.shared.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace Library.Triggers
4 | {
5 | public class NumericValidationTriggerAction : TriggerAction
6 | {
7 | protected override void Invoke(Entry entry)
8 | {
9 | bool isValid = double.TryParse(entry.Text, out double result);
10 | entry.TextColor = isValid ? Color.Default : Color.Red;
11 | }
12 | }
13 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Xamarin.Forms;
8 |
9 | namespace Library.Sample
10 | {
11 | public partial class MainPage : ContentPage
12 | {
13 | public MainPage()
14 | {
15 | InitializeComponent();
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/AppShell.xaml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
11 |
12 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Android/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.OS;
4 |
5 | namespace Library.Sample
6 | {
7 | [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8 | public class MainActivity : MauiAppCompatActivity
9 | {
10 | }
11 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/iOS/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Library.Sample
5 | {
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/MacCatalyst/Program.cs:
--------------------------------------------------------------------------------
1 | using ObjCRuntime;
2 | using UIKit;
3 |
4 | namespace Library.Sample
5 | {
6 | public class Program
7 | {
8 | // This is the main entry point of the application.
9 | static void Main(string[] args)
10 | {
11 | // if you want to use a different Application Delegate class from "AppDelegate"
12 | // you can specify it here.
13 | UIApplication.Main(args, null, typeof(AppDelegate));
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Converters/IntToBoolConverter.cs:
--------------------------------------------------------------------------------
1 | using System.Globalization;
2 |
3 | namespace Library.Converters
4 | {
5 | public class IntToBoolConverter : IValueConverter
6 | {
7 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
8 | {
9 | return (int)value != 0;
10 | }
11 |
12 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
13 | {
14 | return (bool)value ? 1 : 0;
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Resources/Raw/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "MauiAsset":
3 |
4 |
5 |
6 | These files will be deployed with you package and will be accessible using Essentials:
7 |
8 | async Task LoadMauiAsset()
9 | {
10 | using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
11 | using var reader = new StreamReader(stream);
12 |
13 | var contents = reader.ReadToEnd();
14 | }
15 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Converters/IntToBoolConverter.shared.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using Xamarin.Forms;
4 |
5 | namespace Library.Converters
6 | {
7 | public class IntToBoolConverter : IValueConverter
8 | {
9 | public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
10 | {
11 | return (int)value != 0;
12 | }
13 |
14 | public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
15 | {
16 | return (bool)value ? 1 : 0;
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Controls/ICustomEntry.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui;
2 | using Microsoft.Maui.Graphics;
3 |
4 | namespace Library.Controls
5 | {
6 | public interface ICustomEntry : IView
7 | {
8 | public string Text { get; }
9 | public Color TextColor { get; }
10 | public string Placeholder { get; }
11 | public Color PlaceholderColor { get; }
12 | public double CharacterSpacing { get; }
13 | public TextAlignment HorizontalTextAlignment { get; }
14 | public TextAlignment VerticalTextAlignment { get; }
15 |
16 | void SendCompleted();
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace Library.Sample.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, typeof(AppDelegate));
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Xamarin.Forms.Xaml;
4 |
5 | namespace Library.Sample
6 | {
7 | public partial class App : Application
8 | {
9 | public App()
10 | {
11 | InitializeComponent();
12 |
13 | MainPage = new MainPage();
14 | }
15 |
16 | protected override void OnStart()
17 | {
18 | }
19 |
20 | protected override void OnSleep()
21 | {
22 | }
23 |
24 | protected override void OnResume()
25 | {
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Windows/CustomEntryRenderer.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Library.Renderers.Windows;
3 | using Microsoft.Maui.Controls.Compatibility;
4 | using Microsoft.Maui.Controls.Compatibility.Platform.UWP;
5 | using Microsoft.Maui.Controls.Platform;
6 |
7 | [assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
8 | namespace Library.Renderers.Windows
9 | {
10 | public class CustomEntryRenderer : EntryRenderer
11 | {
12 | protected override void OnElementChanged(ElementChangedEventArgs e)
13 | {
14 | base.OnElementChanged(e);
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Android/MainApplication.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Runtime;
3 | using Library.Handlers;
4 |
5 | namespace Library.Sample
6 | {
7 | [Application]
8 | public class MainApplication : MauiApplication
9 | {
10 | public MainApplication(IntPtr handle, JniHandleOwnership ownership)
11 | : base(handle, ownership)
12 | {
13 | /*
14 | CustomEntryHandler.CustomEntryMapper.Add("RemoveBorder", (h, w) =>
15 | {
16 | h.PlatformView.Background = null;
17 | });
18 | */
19 | }
20 |
21 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample/Library.Sample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | true
6 |
7 |
8 |
9 | portable
10 | true
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Renderers/CustomEntryRenderer.ios.cs:
--------------------------------------------------------------------------------
1 | using Renderers;
2 | using Renderers.iOS.Renderers;
3 | using UIKit;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Platform.iOS;
6 |
7 | [assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
8 | namespace Library.Renderers.iOS
9 | {
10 | public class CustomEntryRenderer : EntryRenderer
11 | {
12 | protected override void OnElementChanged(ElementChangedEventArgs e)
13 | {
14 | base.OnElementChanged(e);
15 |
16 | if (Control != null)
17 | {
18 | Control.BackgroundColor = UIColor.FromRGB(204, 153, 255);
19 | Control.BorderStyle = UITextBorderStyle.Line;
20 | }
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Windows/app.manifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 | true/PM
12 | PerMonitorV2, PerMonitor
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Behaviors/NumericValidationBehavior.cs:
--------------------------------------------------------------------------------
1 | namespace Library.Behaviors
2 | {
3 | public class NumericValidationBehavior : Behavior
4 | {
5 | protected override void OnAttachedTo(Entry entry)
6 | {
7 | entry.TextChanged += OnEntryTextChanged;
8 | base.OnAttachedTo(entry);
9 | }
10 |
11 | protected override void OnDetachingFrom(Entry entry)
12 | {
13 | entry.TextChanged -= OnEntryTextChanged;
14 | base.OnDetachingFrom(entry);
15 | }
16 |
17 | void OnEntryTextChanged(object sender, TextChangedEventArgs args)
18 | {
19 | bool isValid = double.TryParse(args.NewTextValue, out double result);
20 | ((Entry)sender).TextColor = isValid ? Colors.Black : Colors.Red;
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/iOS/CustomEntryRenderer.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Library.Renderers.iOS;
3 | using Microsoft.Maui.Controls.Compatibility;
4 | using Microsoft.Maui.Controls.Compatibility.Platform.iOS;
5 | using Microsoft.Maui.Controls.Platform;
6 | using UIKit;
7 |
8 | [assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
9 | namespace Library.Renderers.iOS
10 | {
11 | public class CustomEntryRenderer : EntryRenderer
12 | {
13 | protected override void OnElementChanged(ElementChangedEventArgs e)
14 | {
15 | base.OnElementChanged(e);
16 |
17 | if (Control != null)
18 | {
19 | Control.BackgroundColor = UIColor.FromRGB(204, 153, 255);
20 | Control.BorderStyle = UITextBorderStyle.Line;
21 | }
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/MacCatalyst/CustomEntryRenderer.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Library.Renderers.Mac;
3 | using Microsoft.Maui.Controls.Compatibility;
4 | using Microsoft.Maui.Controls.Compatibility.Platform.iOS;
5 | using Microsoft.Maui.Controls.Platform;
6 | using UIKit;
7 |
8 | [assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
9 | namespace Library.Renderers.Mac
10 | {
11 | public class CustomEntryRenderer : EntryRenderer
12 | {
13 | protected override void OnElementChanged(ElementChangedEventArgs e)
14 | {
15 | base.OnElementChanged(e);
16 |
17 | if (Control != null)
18 | {
19 | Control.BackgroundColor = UIColor.FromRGB(204, 153, 255);
20 | Control.BorderStyle = UITextBorderStyle.Line;
21 | }
22 | }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Behaviors/NumericValidationBehavior.shared.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 |
3 | namespace Library.Behaviors
4 | {
5 | public class NumericValidationBehavior : Behavior
6 | {
7 | protected override void OnAttachedTo(Entry entry)
8 | {
9 | entry.TextChanged += OnEntryTextChanged;
10 | base.OnAttachedTo(entry);
11 | }
12 |
13 | protected override void OnDetachingFrom(Entry entry)
14 | {
15 | entry.TextChanged -= OnEntryTextChanged;
16 | base.OnDetachingFrom(entry);
17 | }
18 |
19 | void OnEntryTextChanged(object sender, TextChangedEventArgs args)
20 | {
21 | bool isValid = double.TryParse(args.NewTextValue, out double result);
22 | ((Entry)sender).TextColor = isValid ? Color.Default : Color.Red;
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Android/ColorStateListExtensions.cs:
--------------------------------------------------------------------------------
1 | using Android.Content.Res;
2 | using AColor = Android.Graphics.Color;
3 |
4 | namespace Library.Extensions.Android
5 | {
6 | internal static class ColorStateListExtensions
7 | {
8 | public static bool IsOneColor(
9 | this ColorStateList csl,
10 | int[][] ColorStates,
11 | AColor color)
12 | {
13 | if (csl == null)
14 | return false;
15 |
16 | if (ColorStates.Length == 0)
17 | return false;
18 |
19 | for (int i = 0; i < ColorStates.Length; i++)
20 | {
21 | var colorState = ColorStates[i];
22 | if (csl.GetColorForState(colorState, color) != color)
23 | return false;
24 | }
25 |
26 | return true;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Renderers/ColorStateListExtensions.android.cs:
--------------------------------------------------------------------------------
1 | using Android.Content.Res;
2 | using AColor = Android.Graphics.Color;
3 |
4 | namespace Library.Extensions.Android
5 | {
6 | internal static class ColorStateListExtensions
7 | {
8 | public static bool IsOneColor(
9 | this ColorStateList? csl,
10 | int[][] ColorStates,
11 | AColor color)
12 | {
13 | if (csl == null)
14 | return false;
15 |
16 | if (ColorStates.Length == 0)
17 | return false;
18 |
19 | for (int i = 0; i < ColorStates.Length; i++)
20 | {
21 | var colorState = ColorStates[i];
22 | if (csl.GetColorForState(colorState, color) != color)
23 | return false;
24 | }
25 |
26 | return true;
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Windows/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.UI.Xaml;
2 |
3 | // To learn more about WinUI, the WinUI project structure,
4 | // and more about our project templates, see: http://aka.ms/winui-project-info.
5 |
6 | namespace Library.Sample.WinUI
7 | {
8 | ///
9 | /// Provides application-specific behavior to supplement the default Application class.
10 | ///
11 | public partial class App : MauiWinUIApplication
12 | {
13 | ///
14 | /// Initializes the singleton application object. This is the first line of authored code
15 | /// executed, and as such is the logical equivalent of main() or WinMain().
16 | ///
17 | public App()
18 | {
19 | this.InitializeComponent();
20 | }
21 |
22 | protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
23 | }
24 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
18 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/MauiProgram.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Library.Effects;
3 | using Library.Hosting;
4 | using Microsoft.Maui.Controls.Compatibility.Hosting;
5 |
6 | namespace Library.Sample
7 | {
8 | public static class MauiProgram
9 | {
10 | public static MauiApp CreateMauiApp()
11 | {
12 | var builder = MauiApp.CreateBuilder();
13 |
14 | builder
15 | .UseMauiApp()
16 | .ConfigureLibrary()
17 | /*
18 | .ConfigureEffects(effects =>
19 | {
20 | effects.Add(typeof(FocusRoutingEffect), typeof(PlatformFocusPlatformEffect));
21 | })
22 | .ConfigureMauiHandlers(handlers =>
23 | {
24 | #if __ANDROID__
25 | handlers.AddCompatibilityRenderer(typeof(CustomEntry), typeof(Renderers.Android.CustomEntryRenderer));
26 | #endif
27 | })
28 | */;
29 |
30 | return builder.Build();
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Handlers/CustomEntryMapper.Standard.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Microsoft.Maui.Handlers;
3 |
4 | namespace Library.Handlers
5 | {
6 | public partial class CustomEntryHandler : ViewHandler
7 | {
8 | protected override object CreatePlatformView() => throw new NotImplementedException();
9 |
10 | public static void MapText(CustomEntryHandler handler, ICustomEntry entry) { }
11 |
12 | public static void MapTextColor(CustomEntryHandler handler, ICustomEntry entry) { }
13 |
14 | public static void MapPlaceholder(CustomEntryHandler handler, ICustomEntry entry) { }
15 |
16 | public static void MapPlaceholderColor(CustomEntryHandler handler, ICustomEntry entry) { }
17 |
18 | public static void MapCharacterSpacing(CustomEntryHandler handler, ICustomEntry entry) { }
19 |
20 | public static void MapHorizontalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
21 |
22 | public static void MapVerticalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
23 | }
24 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/MacCatalyst/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UIRequiredDeviceCapabilities
11 |
12 | arm64
13 |
14 | UISupportedInterfaceOrientations
15 |
16 | UIInterfaceOrientationPortrait
17 | UIInterfaceOrientationLandscapeLeft
18 | UIInterfaceOrientationLandscapeRight
19 |
20 | UISupportedInterfaceOrientations~ipad
21 |
22 | UIInterfaceOrientationPortrait
23 | UIInterfaceOrientationPortraitUpsideDown
24 | UIInterfaceOrientationLandscapeLeft
25 | UIInterfaceOrientationLandscapeRight
26 |
27 | XSAppIconAssets
28 | Assets.xcassets/appicon.appiconset
29 |
30 |
31 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Library.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | net6.0;net6.0-android;net6.0-ios;net6.0-maccatalyst
4 | $(TargetFrameworks);net6.0-windows10.0.19041
5 | true
6 | true
7 | enable
8 | 14.2
9 | 14.0
10 | 21.0
11 | 10.0.17763.0
12 | 10.0.17763.0
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | LSRequiresIPhoneOS
6 |
7 | UIDeviceFamily
8 |
9 | 1
10 | 2
11 |
12 | UIRequiredDeviceCapabilities
13 |
14 | arm64
15 |
16 | UISupportedInterfaceOrientations
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationLandscapeLeft
20 | UIInterfaceOrientationLandscapeRight
21 |
22 | UISupportedInterfaceOrientations~ipad
23 |
24 | UIInterfaceOrientationPortrait
25 | UIInterfaceOrientationPortraitUpsideDown
26 | UIInterfaceOrientationLandscapeLeft
27 | UIInterfaceOrientationLandscapeRight
28 |
29 | XSAppIconAssets
30 | Assets.xcassets/appicon.appiconset
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using Foundation;
2 | using UIKit;
3 |
4 | namespace Library.Sample.iOS
5 | {
6 | // The UIApplicationDelegate for the application. This class is responsible for launching the
7 | // User Interface of the application, as well as listening (and optionally responding) to
8 | // application events from iOS.
9 | [Register("AppDelegate")]
10 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
11 | {
12 | //
13 | // This method is invoked when the application has loaded and is ready to run. In this
14 | // method you should instantiate the window, load the UI into it and then make the window
15 | // visible.
16 | //
17 | // You have 17 seconds to return from this method, or iOS will terminate your application.
18 | //
19 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
20 | {
21 | global::Xamarin.Forms.Forms.Init();
22 | LoadApplication(new App());
23 |
24 | return base.FinishedLaunching(app, options);
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Handlers/CustomEntryHandler.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Microsoft.Maui.Handlers;
3 |
4 | namespace Library.Handlers
5 | {
6 | public partial class CustomEntryHandler
7 | {
8 | public static PropertyMapper CustomEntryMapper = new PropertyMapper(ViewHandler.ViewMapper)
9 | {
10 | [nameof(ICustomEntry.Text)] = MapText,
11 | [nameof(ICustomEntry.TextColor)] = MapTextColor,
12 | [nameof(ICustomEntry.Placeholder)] = MapPlaceholder,
13 | [nameof(ICustomEntry.PlaceholderColor)] = MapPlaceholderColor,
14 | [nameof(ICustomEntry.CharacterSpacing)] = MapCharacterSpacing,
15 | [nameof(ICustomEntry.HorizontalLayoutAlignment)] = MapHorizontalLayoutAlignment,
16 | [nameof(ICustomEntry.VerticalLayoutAlignment)] = MapVerticalLayoutAlignment
17 | };
18 |
19 | public CustomEntryHandler() : base(CustomEntryMapper)
20 | {
21 |
22 | }
23 |
24 | public CustomEntryHandler(PropertyMapper mapper = null) : base(mapper ?? CustomEntryMapper)
25 | {
26 |
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Platforms/Windows/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 | User Name
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Library.Sample.Android")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("Library.Sample.Android")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | [assembly: AssemblyVersion("1.0.0.0")]
26 | [assembly: AssemblyFileVersion("1.0.0.0")]
27 |
28 | // Add some common permissions, these can be removed if not needed
29 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
30 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
31 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/iOS/CustomEntryHandler.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Microsoft.Maui.Handlers;
3 | using UIKit;
4 |
5 | namespace Library.Handlers
6 | {
7 | public partial class CustomEntryHandler : ViewHandler
8 | {
9 | protected override UIView CreatePlatformView() => throw new NotImplementedException();
10 |
11 | [MissingMapper]
12 | public static void MapText(CustomEntryHandler handler, ICustomEntry entry) { }
13 |
14 | [MissingMapper]
15 | public static void MapTextColor(CustomEntryHandler handler, ICustomEntry entry) { }
16 |
17 | [MissingMapper]
18 | public static void MapPlaceholder(CustomEntryHandler handler, ICustomEntry entry) { }
19 |
20 | [MissingMapper]
21 | public static void MapPlaceholderColor(CustomEntryHandler handler, ICustomEntry entry) { }
22 |
23 | [MissingMapper]
24 | public static void MapCharacterSpacing(CustomEntryHandler handler, ICustomEntry entry) { }
25 |
26 | [MissingMapper]
27 | public static void MapHorizontalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
28 |
29 | [MissingMapper]
30 | public static void MapVerticalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/MacCatalyst/CustomEntryHandler.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Microsoft.Maui.Handlers;
3 | using UIKit;
4 |
5 | namespace Library.Handlers
6 | {
7 | public partial class CustomEntryHandler : ViewHandler
8 | {
9 | protected override UIView CreatePlatformView() => throw new NotImplementedException();
10 |
11 | [MissingMapper]
12 | public static void MapText(CustomEntryHandler handler, ICustomEntry entry) { }
13 |
14 | [MissingMapper]
15 | public static void MapTextColor(CustomEntryHandler handler, ICustomEntry entry) { }
16 |
17 | [MissingMapper]
18 | public static void MapPlaceholder(CustomEntryHandler handler, ICustomEntry entry) { }
19 |
20 | [MissingMapper]
21 | public static void MapPlaceholderColor(CustomEntryHandler handler, ICustomEntry entry) { }
22 |
23 | [MissingMapper]
24 | public static void MapCharacterSpacing(CustomEntryHandler handler, ICustomEntry entry) { }
25 |
26 | [MissingMapper]
27 | public static void MapHorizontalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
28 |
29 | [MissingMapper]
30 | public static void MapVerticalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using Android.App;
2 | using Android.Content.PM;
3 | using Android.Runtime;
4 | using Android.OS;
5 |
6 | namespace Library.Sample.Droid
7 | {
8 | [Activity(Label = "Library.Sample", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
9 | public class MainActivity : Xamarin.Forms.Platform.Android.FormsAppCompatActivity
10 | {
11 | protected override void OnCreate(Bundle savedInstanceState)
12 | {
13 | base.OnCreate(savedInstanceState);
14 |
15 | Xamarin.Essentials.Platform.Init(this, savedInstanceState);
16 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
17 | LoadApplication(new App());
18 | }
19 |
20 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
21 | {
22 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
23 |
24 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
25 | }
26 | }
27 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Windows/CustomEntryHandler.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Microsoft.Maui.Handlers;
3 | using Microsoft.UI.Xaml;
4 |
5 | namespace Library.Handlers
6 | {
7 | public partial class CustomEntryHandler : ViewHandler
8 | {
9 | protected override FrameworkElement CreatePlatformView() => throw new NotImplementedException();
10 |
11 | [MissingMapper]
12 | public static void MapText(CustomEntryHandler handler, ICustomEntry entry) { }
13 |
14 | [MissingMapper]
15 | public static void MapTextColor(CustomEntryHandler handler, ICustomEntry entry) { }
16 |
17 | [MissingMapper]
18 | public static void MapPlaceholder(CustomEntryHandler handler, ICustomEntry entry) { }
19 |
20 | [MissingMapper]
21 | public static void MapPlaceholderColor(CustomEntryHandler handler, ICustomEntry entry) { }
22 |
23 | [MissingMapper]
24 | public static void MapCharacterSpacing(CustomEntryHandler handler, ICustomEntry entry) { }
25 |
26 | [MissingMapper]
27 | public static void MapHorizontalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
28 |
29 | [MissingMapper]
30 | public static void MapVerticalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry) { }
31 | }
32 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 8.0
25 | CFBundleDisplayName
26 | Library.Sample
27 | CFBundleIdentifier
28 | com.companyname.Library.Sample
29 | CFBundleVersion
30 | 1.0
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | CFBundleName
34 | Library.Sample
35 | XSAppIconAssets
36 | Assets.xcassets/AppIcon.appiconset
37 |
38 |
39 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Library.Sample.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Library.Sample.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Library.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 | netstandard2.0;xamarinios10;monoandroid10.0;
4 | false
5 | latest
6 | portable
7 | Debug;Release
8 | false
9 | portable
10 | NU1701
11 |
12 |
13 |
14 |
15 | true
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Hosting/AppHostBuilderExtensions.cs:
--------------------------------------------------------------------------------
1 | using Library.Controls;
2 | using Library.Effects;
3 | using Library.Handlers;
4 | using Microsoft.Extensions.DependencyInjection.Extensions;
5 | using Microsoft.Maui.Controls.Compatibility.Hosting;
6 |
7 | namespace Library.Hosting
8 | {
9 | public static class AppHostBuilderExtensions
10 | {
11 | public static MauiAppBuilder ConfigureLibrary(this MauiAppBuilder builder, bool useCompatibilityRenderers = false)
12 | {
13 | builder
14 | .ConfigureEffects(effects =>
15 | {
16 | effects.Add(typeof(FocusRoutingEffect), typeof(PlatformFocusPlatformEffect));
17 | })
18 | .ConfigureMauiHandlers(handlers =>
19 | {
20 | if (useCompatibilityRenderers)
21 | handlers.AddLibraryCompatibilityRenderers();
22 | else
23 | handlers.AddLibraryHandlers();
24 | });
25 |
26 | return builder;
27 | }
28 |
29 | public static IMauiHandlersCollection AddLibraryCompatibilityRenderers(this IMauiHandlersCollection handlers)
30 | {
31 | #if __ANDROID__
32 | handlers.AddCompatibilityRenderer(typeof(CustomEntry), typeof(Renderers.Android.CustomEntryRenderer));
33 | #endif
34 | return handlers;
35 | }
36 |
37 | public static IMauiHandlersCollection AddLibraryHandlers(this IMauiHandlersCollection handlers)
38 | {
39 | handlers.AddTransient(typeof(CustomEntry), h => new CustomEntryHandler());
40 |
41 | return handlers;
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Resources/appiconfg.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Effects/FocusRoutingEffectImpl.ios.cs:
--------------------------------------------------------------------------------
1 | using Effects.iOS.Effects;
2 | using System;
3 | using System.ComponentModel;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Platform.iOS;
6 |
7 | [assembly: ResolutionGroupName("Effects")]
8 | [assembly: ExportEffect(typeof(FocusPlatformEffectImpl), "FocusEffect")]
9 | namespace Library.Effects.iOS
10 | {
11 | public class FocusPlatformEffectImpl : PlatformEffect
12 | {
13 | UIKit.UIColor backgroundColor;
14 |
15 | protected override void OnAttached()
16 | {
17 | try
18 | {
19 | Control.BackgroundColor = backgroundColor = UIKit.UIColor.FromRGB(204, 153, 255);
20 | }
21 | catch (Exception ex)
22 | {
23 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
24 | }
25 | }
26 |
27 | protected override void OnDetached()
28 | {
29 | }
30 |
31 | protected override void OnElementPropertyChanged(PropertyChangedEventArgs args)
32 | {
33 | base.OnElementPropertyChanged(args);
34 |
35 | try
36 | {
37 | if (args.PropertyName == "IsFocused")
38 | {
39 | if (Control.BackgroundColor == backgroundColor)
40 | {
41 | Control.BackgroundColor = UIKit.UIColor.White;
42 | }
43 | else
44 | {
45 | Control.BackgroundColor = backgroundColor;
46 | }
47 | }
48 | }
49 | catch (Exception ex)
50 | {
51 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
52 | }
53 | }
54 | }
55 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.2.32317.152
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library", "Library\Library.csproj", "{6CD7F4B9-330D-4D36-99A3-F8038044A366}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library.Sample", "Library.Sample\Library.Sample.csproj", "{8C2A8DE6-11F1-49BD-82A0-A6347EFBF82F}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {6CD7F4B9-330D-4D36-99A3-F8038044A366}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {6CD7F4B9-330D-4D36-99A3-F8038044A366}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {6CD7F4B9-330D-4D36-99A3-F8038044A366}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {6CD7F4B9-330D-4D36-99A3-F8038044A366}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {8C2A8DE6-11F1-49BD-82A0-A6347EFBF82F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {8C2A8DE6-11F1-49BD-82A0-A6347EFBF82F}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {8C2A8DE6-11F1-49BD-82A0-A6347EFBF82F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
23 | {8C2A8DE6-11F1-49BD-82A0-A6347EFBF82F}.Release|Any CPU.ActiveCfg = Release|Any CPU
24 | {8C2A8DE6-11F1-49BD-82A0-A6347EFBF82F}.Release|Any CPU.Build.0 = Release|Any CPU
25 | {8C2A8DE6-11F1-49BD-82A0-A6347EFBF82F}.Release|Any CPU.Deploy.0 = Release|Any CPU
26 | EndGlobalSection
27 | GlobalSection(SolutionProperties) = preSolution
28 | HideSolutionNode = FALSE
29 | EndGlobalSection
30 | GlobalSection(ExtensibilityGlobals) = postSolution
31 | SolutionGuid = {3801AF30-48BA-47C2-86B7-939AB6020D81}
32 | EndGlobalSection
33 | EndGlobal
34 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Renderers/TextAlignmentExtensions.android.cs:
--------------------------------------------------------------------------------
1 | using Android.Views;
2 | using Android.Widget;
3 | using ATextAlignment = Android.Views.TextAlignment;
4 |
5 | namespace Library.Extensions.Android
6 | {
7 | public static class TextAlignmentExtensions
8 | {
9 | public static void UpdateTextAlignment(this EditText view, Xamarin.Forms.TextAlignment horizontal, Xamarin.Forms.TextAlignment vertical)
10 | {
11 | if (view.Context != null)
12 | {
13 | view.Gravity = vertical.ToVerticalGravityFlags() | horizontal.ToHorizontalGravityFlags();
14 | }
15 | else
16 | {
17 | view.TextAlignment = horizontal.ToTextAlignment();
18 | view.Gravity = vertical.ToVerticalGravityFlags();
19 | }
20 | }
21 |
22 | internal static ATextAlignment ToTextAlignment(this Xamarin.Forms.TextAlignment alignment)
23 | {
24 | switch (alignment)
25 | {
26 | case Xamarin.Forms.TextAlignment.Center:
27 | return ATextAlignment.Center;
28 | case Xamarin.Forms.TextAlignment.End:
29 | return ATextAlignment.ViewEnd;
30 | default:
31 | return ATextAlignment.ViewStart;
32 | }
33 | }
34 |
35 | internal static GravityFlags ToHorizontalGravityFlags(this Xamarin.Forms.TextAlignment alignment)
36 | {
37 | switch (alignment)
38 | {
39 | case Xamarin.Forms.TextAlignment.Center:
40 | return GravityFlags.CenterHorizontal;
41 | case Xamarin.Forms.TextAlignment.End:
42 | return GravityFlags.End;
43 | default:
44 | return GravityFlags.Start;
45 | }
46 | }
47 |
48 | internal static GravityFlags ToVerticalGravityFlags(this Xamarin.Forms.TextAlignment alignment)
49 | {
50 | switch (alignment)
51 | {
52 | case Xamarin.Forms.TextAlignment.Start:
53 | return GravityFlags.Top;
54 | case Xamarin.Forms.TextAlignment.End:
55 | return GravityFlags.Bottom;
56 | default:
57 | return GravityFlags.CenterVertical;
58 | }
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Android/TextAlignmentExtensions.cs:
--------------------------------------------------------------------------------
1 | using Android.Views;
2 | using Android.Widget;
3 | using ATextAlignment = Android.Views.TextAlignment;
4 |
5 | namespace Library.Extensions.Android
6 | {
7 | public static class TextAlignmentExtensions
8 | {
9 | public static void UpdateTextAlignment(this EditText view, Microsoft.Maui.TextAlignment horizontal, Microsoft.Maui.TextAlignment vertical)
10 | {
11 | if (view.Context != null)
12 | {
13 | view.Gravity = vertical.ToVerticalGravityFlags() | horizontal.ToHorizontalGravityFlags();
14 | }
15 | else
16 | {
17 | view.TextAlignment = horizontal.ToTextAlignment();
18 | view.Gravity = vertical.ToVerticalGravityFlags();
19 | }
20 | }
21 |
22 | internal static ATextAlignment ToTextAlignment(this Microsoft.Maui.TextAlignment alignment)
23 | {
24 | switch (alignment)
25 | {
26 | case Microsoft.Maui.TextAlignment.Center:
27 | return ATextAlignment.Center;
28 | case Microsoft.Maui.TextAlignment.End:
29 | return ATextAlignment.ViewEnd;
30 | default:
31 | return ATextAlignment.ViewStart;
32 | }
33 | }
34 |
35 | internal static GravityFlags ToHorizontalGravityFlags(this Microsoft.Maui.TextAlignment alignment)
36 | {
37 | switch (alignment)
38 | {
39 | case Microsoft.Maui.TextAlignment.Center:
40 | return GravityFlags.CenterHorizontal;
41 | case Microsoft.Maui.TextAlignment.End:
42 | return GravityFlags.End;
43 | default:
44 | return GravityFlags.Start;
45 | }
46 | }
47 |
48 | internal static GravityFlags ToVerticalGravityFlags(this Microsoft.Maui.TextAlignment alignment)
49 | {
50 | switch (alignment)
51 | {
52 | case Microsoft.Maui.TextAlignment.Start:
53 | return GravityFlags.Top;
54 | case Microsoft.Maui.TextAlignment.End:
55 | return GravityFlags.Bottom;
56 | default:
57 | return GravityFlags.CenterVertical;
58 | }
59 | }
60 | }
61 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Effects/FocusRoutingEffectImpl.android.cs:
--------------------------------------------------------------------------------
1 | using Effects.Droid.Effects;
2 | using System;
3 | using System.ComponentModel;
4 | using Xamarin.Forms;
5 | using Xamarin.Forms.Platform.Android;
6 |
7 | [assembly: ResolutionGroupName("Effects")]
8 | [assembly: ExportEffect(typeof(FocusPlatformEffectImpl), "FocusEffect")]
9 | namespace Library.Effects.Android
10 | {
11 | public class FocusPlatformEffectImpl : PlatformEffect
12 | {
13 | Android.Graphics.Color originalBackgroundColor = new Android.Graphics.Color(0, 0, 0, 0);
14 | Android.Graphics.Color backgroundColor;
15 |
16 | protected override void OnAttached()
17 | {
18 | try
19 | {
20 | backgroundColor = Android.Graphics.Color.LightGreen;
21 | Control.SetBackgroundColor(backgroundColor);
22 | }
23 | catch (Exception ex)
24 | {
25 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
26 | }
27 | }
28 |
29 | protected override void OnDetached()
30 | {
31 | }
32 |
33 | protected override void OnElementPropertyChanged(PropertyChangedEventArgs args)
34 | {
35 | base.OnElementPropertyChanged(args);
36 | try
37 | {
38 | if (args.PropertyName == "IsFocused")
39 | {
40 | if (((Android.Graphics.Drawables.ColorDrawable)Control.Background).Color == backgroundColor)
41 | {
42 | Control.SetBackgroundColor(originalBackgroundColor);
43 | }
44 | else
45 | {
46 | Control.SetBackgroundColor(backgroundColor);
47 | }
48 | }
49 | }
50 | catch (Exception ex)
51 | {
52 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
53 | }
54 | }
55 | }
56 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Library.Sample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | net6.0-android;net6.0-ios;net6.0-maccatalyst
5 | $(TargetFrameworks);net6.0-windows10.0.19041
6 | Exe
7 | Library.Sample
8 | true
9 | true
10 | enable
11 |
12 |
13 | Library.Sample
14 |
15 |
16 | com.companyname.library.sample
17 | FD9229F6-A286-4DB7-905C-335CF8B3F2B1
18 |
19 |
20 | 1.0
21 | 1
22 |
23 | 14.2
24 | 14.0
25 | 21.0
26 | 10.0.17763.0
27 | 10.0.17763.0
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.MultiTargeting.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | false
37 |
38 |
39 |
40 |
41 | $(DefineConstants);MONOANDROID
42 |
43 |
44 |
45 |
46 | $(DefineConstants);IOS
47 |
48 |
49 |
50 |
51 | $(DefineConstants);MACCATALYST;IOS
52 |
53 |
54 |
55 |
56 | 10.0.17763.0
57 | win10-x86;win10-x64;win10-arm64
58 | WINDOWS;$(DefineConstants)
59 |
60 |
61 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Resources/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "scale": "2x",
5 | "size": "20x20",
6 | "idiom": "iphone",
7 | "filename": "Icon40.png"
8 | },
9 | {
10 | "scale": "3x",
11 | "size": "20x20",
12 | "idiom": "iphone",
13 | "filename": "Icon60.png"
14 | },
15 | {
16 | "scale": "2x",
17 | "size": "29x29",
18 | "idiom": "iphone",
19 | "filename": "Icon58.png"
20 | },
21 | {
22 | "scale": "3x",
23 | "size": "29x29",
24 | "idiom": "iphone",
25 | "filename": "Icon87.png"
26 | },
27 | {
28 | "scale": "2x",
29 | "size": "40x40",
30 | "idiom": "iphone",
31 | "filename": "Icon80.png"
32 | },
33 | {
34 | "scale": "3x",
35 | "size": "40x40",
36 | "idiom": "iphone",
37 | "filename": "Icon120.png"
38 | },
39 | {
40 | "scale": "2x",
41 | "size": "60x60",
42 | "idiom": "iphone",
43 | "filename": "Icon120.png"
44 | },
45 | {
46 | "scale": "3x",
47 | "size": "60x60",
48 | "idiom": "iphone",
49 | "filename": "Icon180.png"
50 | },
51 | {
52 | "scale": "1x",
53 | "size": "20x20",
54 | "idiom": "ipad",
55 | "filename": "Icon20.png"
56 | },
57 | {
58 | "scale": "2x",
59 | "size": "20x20",
60 | "idiom": "ipad",
61 | "filename": "Icon40.png"
62 | },
63 | {
64 | "scale": "1x",
65 | "size": "29x29",
66 | "idiom": "ipad",
67 | "filename": "Icon29.png"
68 | },
69 | {
70 | "scale": "2x",
71 | "size": "29x29",
72 | "idiom": "ipad",
73 | "filename": "Icon58.png"
74 | },
75 | {
76 | "scale": "1x",
77 | "size": "40x40",
78 | "idiom": "ipad",
79 | "filename": "Icon40.png"
80 | },
81 | {
82 | "scale": "2x",
83 | "size": "40x40",
84 | "idiom": "ipad",
85 | "filename": "Icon80.png"
86 | },
87 | {
88 | "scale": "1x",
89 | "size": "76x76",
90 | "idiom": "ipad",
91 | "filename": "Icon76.png"
92 | },
93 | {
94 | "scale": "2x",
95 | "size": "76x76",
96 | "idiom": "ipad",
97 | "filename": "Icon152.png"
98 | },
99 | {
100 | "scale": "2x",
101 | "size": "83.5x83.5",
102 | "idiom": "ipad",
103 | "filename": "Icon167.png"
104 | },
105 | {
106 | "scale": "1x",
107 | "size": "1024x1024",
108 | "idiom": "ios-marketing",
109 | "filename": "Icon1024.png"
110 | }
111 | ],
112 | "properties": {},
113 | "info": {
114 | "version": 1,
115 | "author": "xcode"
116 | }
117 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Android/CustomEntryExtensions.cs:
--------------------------------------------------------------------------------
1 | #nullable enable
2 | using Android.Content.Res;
3 | using Android.Widget;
4 | using Library.Controls;
5 | using Microsoft.Maui.Platform;
6 | using AResource = Android.Resource;
7 |
8 | namespace Library.Extensions.Android
9 | {
10 | public static class CustomEntryExtensions
11 | {
12 | static readonly int[][] ColorStates =
13 | {
14 | new[] { AResource.Attribute.StateEnabled },
15 | new[] { -AResource.Attribute.StateEnabled }
16 | };
17 |
18 | public static void UpdateText(this EditText editText, ICustomEntry entry)
19 | {
20 | editText.Text = entry.Text;
21 | }
22 |
23 | public static void UpdateTextColor(this EditText editText, ICustomEntry entry, ColorStateList? defaultTextColors)
24 | {
25 | var textColor = entry.TextColor;
26 |
27 | if (textColor == null)
28 | {
29 | if (defaultTextColors != null)
30 | editText.SetTextColor(defaultTextColors);
31 | }
32 | else
33 | {
34 | var androidColor = textColor.ToPlatform();
35 |
36 | if (!editText.TextColors.IsOneColor(ColorStates, androidColor))
37 | {
38 | var acolor = androidColor.ToArgb();
39 | editText.SetTextColor(new ColorStateList(ColorStates, new[] { acolor, acolor }));
40 | }
41 | }
42 | }
43 |
44 | public static void UpdatePlaceholder(this EditText editText, ICustomEntry entry)
45 | {
46 | if (editText.Hint == entry.Placeholder)
47 | return;
48 |
49 | editText.Hint = entry.Placeholder;
50 | }
51 |
52 | public static void UpdatePlaceholderColor(this EditText editText, ICustomEntry entry, ColorStateList? defaultPlaceholderColors)
53 | {
54 | var placeholderTextColor = entry.PlaceholderColor;
55 |
56 | if (placeholderTextColor == null)
57 | {
58 | editText.SetHintTextColor(defaultPlaceholderColors);
59 | }
60 | else
61 | {
62 | var androidColor = placeholderTextColor.ToPlatform();
63 |
64 | if (!editText.HintTextColors.IsOneColor(ColorStates, androidColor))
65 | {
66 | var acolor = androidColor.ToArgb();
67 | editText.SetHintTextColor(new ColorStateList(ColorStates, new[] { acolor, acolor }));
68 | }
69 | }
70 | }
71 |
72 | public static void UpdateCharacterSpacing(this EditText editText, ICustomEntry entry)
73 | {
74 | editText.LetterSpacing = entry.CharacterSpacing.ToEm();
75 | }
76 |
77 | public static void UpdateHorizontalLayoutAlignment(this EditText editText, ICustomEntry entry)
78 | {
79 | editText.UpdateTextAlignment(entry.HorizontalTextAlignment, entry.VerticalTextAlignment);
80 | }
81 |
82 | public static void UpdateVerticaLayoutAlignment(this EditText editText, ICustomEntry entry)
83 | {
84 | editText.UpdateTextAlignment(entry.HorizontalTextAlignment, entry.VerticalTextAlignment);
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Controls/CustomEntry.cs:
--------------------------------------------------------------------------------
1 | using System.ComponentModel;
2 |
3 | namespace Library.Controls
4 | {
5 | public class CustomEntry : View, ICustomEntry
6 | {
7 | public static readonly BindableProperty TextProperty =
8 | BindableProperty.Create(nameof(Text), typeof(string), typeof(Entry), string.Empty);
9 |
10 | public static readonly BindableProperty TextColorProperty =
11 | BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(Entry), Colors.Black);
12 |
13 | public static readonly BindableProperty PlaceholderProperty =
14 | BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(Entry), string.Empty);
15 |
16 | public static readonly BindableProperty PlaceholderColorProperty =
17 | BindableProperty.Create(nameof(PlaceholderColor), typeof(Color), typeof(Entry), Colors.Black);
18 |
19 | public static readonly BindableProperty CharacterSpacingProperty =
20 | BindableProperty.Create(nameof(CharacterSpacing), typeof(double), typeof(Entry), 0.0d);
21 |
22 | public static readonly BindableProperty HorizontalTextAlignmentProperty =
23 | BindableProperty.Create(nameof(HorizontalTextAlignment), typeof(TextAlignment), typeof(Entry), TextAlignment.Start);
24 |
25 | public static readonly BindableProperty VerticalTextAlignmentProperty =
26 | BindableProperty.Create(nameof(VerticalTextAlignment), typeof(TextAlignment), typeof(Entry), TextAlignment.Start);
27 |
28 | public string Text
29 | {
30 | get { return (string)GetValue(TextProperty); }
31 | set { SetValue(TextProperty, value); }
32 | }
33 |
34 | public Color TextColor
35 | {
36 | get { return (Color)GetValue(TextColorProperty); }
37 | set { SetValue(TextColorProperty, value); }
38 | }
39 | public string Placeholder
40 | {
41 | get { return (string)GetValue(PlaceholderProperty); }
42 | set { SetValue(PlaceholderProperty, value); }
43 | }
44 |
45 | public Color PlaceholderColor
46 | {
47 | get { return (Color)GetValue(PlaceholderColorProperty); }
48 | set { SetValue(PlaceholderColorProperty, value); }
49 | }
50 |
51 | public double CharacterSpacing
52 | {
53 | get { return (double)GetValue(CharacterSpacingProperty); }
54 | set { SetValue(CharacterSpacingProperty, value); }
55 | }
56 |
57 | public TextAlignment HorizontalTextAlignment
58 | {
59 | get { return (TextAlignment)GetValue(HorizontalTextAlignmentProperty); }
60 | set { SetValue(HorizontalTextAlignmentProperty, value); }
61 | }
62 |
63 | public TextAlignment VerticalTextAlignment
64 | {
65 | get { return (TextAlignment)GetValue(VerticalTextAlignmentProperty); }
66 | set { SetValue(VerticalTextAlignmentProperty, value); }
67 | }
68 |
69 | public event EventHandler Completed;
70 |
71 | [EditorBrowsable(EditorBrowsableState.Never)]
72 | public void SendCompleted()
73 | {
74 | if (IsEnabled)
75 | {
76 | Completed?.Invoke(this, EventArgs.Empty);
77 | }
78 | }
79 | }
80 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Renderers/CustomEntry.shared.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using Xamarin.Forms;
4 |
5 | namespace Library.Renderers
6 | {
7 | public class CustomEntry : View
8 | {
9 | public static readonly BindableProperty TextProperty =
10 | BindableProperty.Create(nameof(Text), typeof(string), typeof(Entry), string.Empty);
11 |
12 | public static readonly BindableProperty TextColorProperty =
13 | BindableProperty.Create(nameof(TextColor), typeof(Color), typeof(Entry), Color.Default);
14 |
15 | public static readonly BindableProperty PlaceholderProperty =
16 | BindableProperty.Create(nameof(Placeholder), typeof(string), typeof(Entry), string.Empty);
17 |
18 | public static readonly BindableProperty PlaceholderColorProperty =
19 | BindableProperty.Create(nameof(PlaceholderColor), typeof(Color), typeof(Entry), Color.Default);
20 |
21 | public static readonly BindableProperty CharacterSpacingProperty =
22 | BindableProperty.Create(nameof(CharacterSpacing), typeof(double), typeof(Entry), 0.0d);
23 |
24 | public static readonly BindableProperty HorizontalTextAlignmentProperty =
25 | BindableProperty.Create(nameof(HorizontalTextAlignment), typeof(TextAlignment), typeof(Entry), TextAlignment.Start);
26 |
27 | public static readonly BindableProperty VerticalTextAlignmentProperty =
28 | BindableProperty.Create(nameof(VerticalTextAlignment), typeof(TextAlignment), typeof(Entry), TextAlignment.Start);
29 |
30 | public string Text
31 | {
32 | get { return (string)GetValue(TextProperty); }
33 | set { SetValue(TextProperty, value); }
34 | }
35 |
36 | public Color TextColor
37 | {
38 | get { return (Color)GetValue(TextColorProperty); }
39 | set { SetValue(TextColorProperty, value); }
40 | }
41 | public string Placeholder
42 | {
43 | get { return (string)GetValue(PlaceholderProperty); }
44 | set { SetValue(PlaceholderProperty, value); }
45 | }
46 |
47 | public Color PlaceholderColor
48 | {
49 | get { return (Color)GetValue(PlaceholderColorProperty); }
50 | set { SetValue(PlaceholderColorProperty, value); }
51 | }
52 |
53 | public double CharacterSpacing
54 | {
55 | get { return (double)GetValue(CharacterSpacingProperty); }
56 | set { SetValue(CharacterSpacingProperty, value); }
57 | }
58 |
59 | public TextAlignment HorizontalTextAlignment
60 | {
61 | get { return (TextAlignment)GetValue(HorizontalTextAlignmentProperty); }
62 | set { SetValue(HorizontalTextAlignmentProperty, value); }
63 | }
64 |
65 | public TextAlignment VerticalTextAlignment
66 | {
67 | get { return (TextAlignment)GetValue(VerticalTextAlignmentProperty); }
68 | set { SetValue(VerticalTextAlignmentProperty, value); }
69 | }
70 |
71 | public event EventHandler Completed;
72 |
73 | [EditorBrowsable(EditorBrowsableState.Never)]
74 | public void SendCompleted()
75 | {
76 | if (IsEnabled)
77 | {
78 | Completed?.Invoke(this, EventArgs.Empty);
79 | }
80 | }
81 | }
82 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Android/CustomEntryHandler.cs:
--------------------------------------------------------------------------------
1 | #nullable enable
2 | using Android.Content.Res;
3 | using Android.Text;
4 | using Android.Widget;
5 | using Library.Controls;
6 | using Library.Extensions.Android;
7 | using Microsoft.Maui.Handlers;
8 |
9 | namespace Library.Handlers
10 | {
11 | public partial class CustomEntryHandler : ViewHandler
12 | {
13 | ColorStateList? _defaultTextColors;
14 | ColorStateList? _defaultPlaceholderColors;
15 |
16 | readonly TextWatcher _watcher = new();
17 |
18 | protected override EditText CreatePlatformView()
19 | {
20 | return new EditText(Context);
21 | }
22 |
23 | protected override void ConnectHandler(EditText nativeView)
24 | {
25 | _defaultTextColors = nativeView.TextColors;
26 | _defaultPlaceholderColors = nativeView.HintTextColors;
27 |
28 | _watcher.Handler = this;
29 | nativeView.AddTextChangedListener(_watcher);
30 |
31 | base.ConnectHandler(nativeView);
32 | }
33 |
34 | protected override void DisconnectHandler(EditText nativeView)
35 | {
36 | nativeView.RemoveTextChangedListener(_watcher);
37 | _watcher.Handler = null;
38 |
39 | base.DisconnectHandler(nativeView);
40 | }
41 |
42 | public static void MapText(CustomEntryHandler handler, ICustomEntry entry)
43 | {
44 | handler.PlatformView?.UpdateText(entry);
45 | }
46 |
47 | public static void MapTextColor(CustomEntryHandler handler, ICustomEntry entry)
48 | {
49 | handler.PlatformView?.UpdateTextColor(entry, handler._defaultTextColors);
50 | }
51 |
52 | public static void MapPlaceholder(CustomEntryHandler handler, ICustomEntry entry)
53 | {
54 | handler.PlatformView?.UpdatePlaceholder(entry);
55 | }
56 |
57 | public static void MapPlaceholderColor(CustomEntryHandler handler, ICustomEntry entry)
58 | {
59 | handler.PlatformView?.UpdatePlaceholderColor(entry, handler._defaultPlaceholderColors);
60 | }
61 |
62 | public static void MapCharacterSpacing(CustomEntryHandler handler, ICustomEntry entry)
63 | {
64 | handler.PlatformView?.UpdateCharacterSpacing(entry);
65 | }
66 |
67 | public static void MapHorizontalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry)
68 | {
69 | handler.PlatformView?.UpdateHorizontalLayoutAlignment(entry);
70 | }
71 |
72 | public static void MapVerticalLayoutAlignment(CustomEntryHandler handler, ICustomEntry entry)
73 | {
74 | handler.PlatformView?.UpdateVerticaLayoutAlignment(entry);
75 | }
76 |
77 | class TextWatcher : Java.Lang.Object, ITextWatcher
78 | {
79 | public CustomEntryHandler? Handler { get; set; }
80 |
81 | void ITextWatcher.AfterTextChanged(IEditable? s)
82 | {
83 | }
84 |
85 | void ITextWatcher.BeforeTextChanged(Java.Lang.ICharSequence? s, int start, int count, int after)
86 | {
87 | }
88 |
89 | void ITextWatcher.OnTextChanged(Java.Lang.ICharSequence? s, int start, int before, int count)
90 | {
91 | // We are replacing 0 characters with 0 characters, so skip
92 | if (before == 0 && count == 0)
93 | return;
94 |
95 | Handler?.VirtualView?.SendCompleted();
96 | }
97 | }
98 | }
99 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Effects/FocusRoutingEffect.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Maui.Controls;
2 | using System;
3 | using System.ComponentModel;
4 |
5 | namespace Library.Effects
6 | {
7 | public class FocusRoutingEffect : RoutingEffect
8 | {
9 |
10 | }
11 |
12 | #if WINDOWS
13 | public class PlatformFocusPlatformEffect : Microsoft.Maui.Controls.Platform.PlatformEffect
14 | {
15 | public PlatformFocusPlatformEffect() : base()
16 | {
17 | }
18 |
19 | protected override void OnAttached()
20 | {
21 | try
22 | {
23 | if (Control is Microsoft.UI.Xaml.Controls.Control control)
24 | control.Background = new Microsoft.UI.Xaml.Media.SolidColorBrush(Microsoft.UI.Colors.Cyan);
25 | }
26 | catch (Exception ex)
27 | {
28 | System.Diagnostics.Debug.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
29 | }
30 |
31 | }
32 |
33 | protected override void OnDetached()
34 | {
35 | }
36 | }
37 | #elif __ANDROID__
38 | public class PlatformFocusPlatformEffect : Microsoft.Maui.Controls.Platform.PlatformEffect
39 | {
40 | Android.Graphics.Color originalBackgroundColor = new Android.Graphics.Color(0, 0, 0, 0);
41 | Android.Graphics.Color backgroundColor;
42 |
43 | protected override void OnAttached()
44 | {
45 | try
46 | {
47 | backgroundColor = Android.Graphics.Color.LightGreen;
48 | Control.SetBackgroundColor(backgroundColor);
49 | }
50 | catch (Exception ex)
51 | {
52 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
53 | }
54 | }
55 |
56 | protected override void OnDetached()
57 | {
58 | }
59 |
60 | protected override void OnElementPropertyChanged(PropertyChangedEventArgs args)
61 | {
62 | base.OnElementPropertyChanged(args);
63 | try
64 | {
65 | if (args.PropertyName == "IsFocused")
66 | {
67 | if (((Android.Graphics.Drawables.ColorDrawable)Control.Background).Color == backgroundColor)
68 | {
69 | Control.SetBackgroundColor(originalBackgroundColor);
70 | }
71 | else
72 | {
73 | Control.SetBackgroundColor(backgroundColor);
74 | }
75 | }
76 | }
77 | catch (Exception ex)
78 | {
79 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
80 | }
81 | }
82 | }
83 | #elif __IOS__
84 | public class PlatformFocusPlatformEffect : Microsoft.Maui.Controls.Platform.PlatformEffect
85 | {
86 | UIKit.UIColor backgroundColor;
87 |
88 | protected override void OnAttached()
89 | {
90 | try
91 | {
92 | Control.BackgroundColor = backgroundColor = UIKit.UIColor.FromRGB(204, 153, 255);
93 | }
94 | catch (Exception ex)
95 | {
96 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
97 | }
98 | }
99 |
100 | protected override void OnDetached()
101 | {
102 | }
103 |
104 | protected override void OnElementPropertyChanged(PropertyChangedEventArgs args)
105 | {
106 | base.OnElementPropertyChanged(args);
107 |
108 | try
109 | {
110 | if (args.PropertyName == "IsFocused")
111 | {
112 | if (Control.BackgroundColor == backgroundColor)
113 | {
114 | Control.BackgroundColor = UIKit.UIColor.White;
115 | }
116 | else
117 | {
118 | Control.BackgroundColor = backgroundColor;
119 | }
120 | }
121 | }
122 | catch (Exception ex)
123 | {
124 | Console.WriteLine("Cannot set property on attached control. Error: ", ex.Message);
125 | }
126 | }
127 | }
128 | #elif STANDARD
129 | public class PlatformFocusPlatformEffect
130 | {
131 | }
132 | #endif
133 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
36 |
38 |
39 |
40 |
41 |
42 |
45 |
47 |
52 |
59 |
64 |
71 |
72 |
75 |
77 |
78 |
79 |
80 |
81 |
84 |
88 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
11 |
12 |
13 |
14 |
15 |
16 |
20 |
21 |
24 |
25 |
26 |
27 |
28 |
30 |
33 |
36 |
38 |
39 |
40 |
41 |
42 |
45 |
47 |
52 |
59 |
64 |
71 |
72 |
75 |
77 |
78 |
79 |
80 |
81 |
84 |
88 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.Android/Library.Sample.Android.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | AnyCPU
6 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}
7 | {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
8 | {c9e5eea5-ca05-42a1-839b-61506e0a37df}
9 | Library
10 | Library.Sample.Droid
11 | Library.Sample.Android
12 | True
13 | True
14 | Resources\Resource.designer.cs
15 | Resource
16 | Properties\AndroidManifest.xml
17 | Resources
18 | Assets
19 | false
20 | v12.0
21 | true
22 | true
23 | Xamarin.Android.Net.AndroidClientHandler
24 |
25 |
26 |
27 |
28 | true
29 | portable
30 | false
31 | bin\Debug
32 | DEBUG;
33 | prompt
34 | 4
35 | None
36 |
37 |
38 | true
39 | portable
40 | true
41 | bin\Release
42 | prompt
43 | 4
44 | true
45 | false
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | {d945db9a-d5d0-4da7-8a94-4fd93a0c8d56}
92 | Library
93 |
94 |
95 | {672FCC1D-0748-4C0E-A8DF-9418BEFC3896}
96 | Library.Sample
97 |
98 |
99 |
100 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 |
4 | # User-specific files
5 | *.suo
6 | *.user
7 | *.userosscache
8 | *.sln.docstates
9 |
10 | # User-specific files (MonoDevelop/Xamarin Studio)
11 | *.userprefs
12 |
13 | # Build results
14 | [Dd]ebug/
15 | [Dd]ebugPublic/
16 | [Rr]elease/
17 | [Rr]eleases/
18 | x64/
19 | x86/
20 | bld/
21 | [Bb]in/
22 | [Oo]bj/
23 | [Ll]og/
24 |
25 | # Visual Studio 2015 cache/options directory
26 | .vs/
27 | # Uncomment if you have tasks that create the project's static files in wwwroot
28 | #wwwroot/
29 |
30 | # MSTest test Results
31 | [Tt]est[Rr]esult*/
32 | [Bb]uild[Ll]og.*
33 |
34 | # NUNIT
35 | *.VisualState.xml
36 | TestResult.xml
37 |
38 | # Build Results of an ATL Project
39 | [Dd]ebugPS/
40 | [Rr]eleasePS/
41 | dlldata.c
42 |
43 | # DNX
44 | project.lock.json
45 | artifacts/
46 |
47 | *_i.c
48 | *_p.c
49 | *_i.h
50 | *.ilk
51 | *.meta
52 | *.obj
53 | *.pch
54 | *.pdb
55 | *.pgc
56 | *.pgd
57 | *.rsp
58 | *.sbr
59 | *.tlb
60 | *.tli
61 | *.tlh
62 | *.tmp
63 | *.tmp_proj
64 | *.log
65 | *.vspscc
66 | *.vssscc
67 | .builds
68 | *.pidb
69 | *.svclog
70 | *.scc
71 |
72 | # Chutzpah Test files
73 | _Chutzpah*
74 |
75 | # Visual C++ cache files
76 | ipch/
77 | *.aps
78 | *.ncb
79 | *.opendb
80 | *.opensdf
81 | *.sdf
82 | *.cachefile
83 | *.VC.db
84 | *.VC.VC.opendb
85 |
86 | # Visual Studio profiler
87 | *.psess
88 | *.vsp
89 | *.vspx
90 | *.sap
91 |
92 | # TFS 2012 Local Workspace
93 | $tf/
94 |
95 | # Guidance Automation Toolkit
96 | *.gpState
97 |
98 | # ReSharper is a .NET coding add-in
99 | _ReSharper*/
100 | *.[Rr]e[Ss]harper
101 | *.DotSettings.user
102 |
103 | # JustCode is a .NET coding add-in
104 | .JustCode
105 |
106 | # TeamCity is a build add-in
107 | _TeamCity*
108 |
109 | # DotCover is a Code Coverage Tool
110 | *.dotCover
111 |
112 | # NCrunch
113 | _NCrunch_*
114 | .*crunch*.local.xml
115 | nCrunchTemp_*
116 |
117 | # MightyMoose
118 | *.mm.*
119 | AutoTest.Net/
120 |
121 | # Web workbench (sass)
122 | .sass-cache/
123 |
124 | # Installshield output folder
125 | [Ee]xpress/
126 |
127 | # DocProject is a documentation generator add-in
128 | DocProject/buildhelp/
129 | DocProject/Help/*.HxT
130 | DocProject/Help/*.HxC
131 | DocProject/Help/*.hhc
132 | DocProject/Help/*.hhk
133 | DocProject/Help/*.hhp
134 | DocProject/Help/Html2
135 | DocProject/Help/html
136 |
137 | # Click-Once directory
138 | publish/
139 |
140 | # Publish Web Output
141 | *.[Pp]ublish.xml
142 | *.azurePubxml
143 | # TODO: Comment the next line if you want to checkin your web deploy settings
144 | # but database connection strings (with potential passwords) will be unencrypted
145 | *.pubxml
146 | *.publishproj
147 |
148 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
149 | # checkin your Azure Web App publish settings, but sensitive information contained
150 | # in these scripts will be unencrypted
151 | PublishScripts/
152 |
153 | # NuGet Packages
154 | *.nupkg
155 | # The packages folder can be ignored because of Package Restore
156 | **/packages/*
157 | # except build/, which is used as an MSBuild target.
158 | !**/packages/build/
159 | # Uncomment if necessary however generally it will be regenerated when needed
160 | #!**/packages/repositories.config
161 | # NuGet v3's project.json files produces more ignoreable files
162 | *.nuget.props
163 | *.nuget.targets
164 |
165 | # Microsoft Azure Build Output
166 | csx/
167 | *.build.csdef
168 |
169 | # Microsoft Azure Emulator
170 | ecf/
171 | rcf/
172 |
173 | # Windows Store app package directories and files
174 | AppPackages/
175 | BundleArtifacts/
176 | Package.StoreAssociation.xml
177 | _pkginfo.txt
178 |
179 | # Visual Studio cache files
180 | # files ending in .cache can be ignored
181 | *.[Cc]ache
182 | # but keep track of directories ending in .cache
183 | !*.[Cc]ache/
184 |
185 | # Others
186 | ClientBin/
187 | ~$*
188 | *~
189 | *.dbmdl
190 | *.dbproj.schemaview
191 | *.pfx
192 | *.publishsettings
193 | node_modules/
194 | orleans.codegen.cs
195 |
196 | # Since there are multiple workflows, uncomment next line to ignore bower_components
197 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
198 | #bower_components/
199 |
200 | # RIA/Silverlight projects
201 | Generated_Code/
202 |
203 | # Backup & report files from converting an old project file
204 | # to a newer Visual Studio version. Backup files are not needed,
205 | # because we have git ;-)
206 | _UpgradeReport_Files/
207 | Backup*/
208 | UpgradeLog*.XML
209 | UpgradeLog*.htm
210 |
211 | # SQL Server files
212 | *.mdf
213 | *.ldf
214 |
215 | # Business Intelligence projects
216 | *.rdl.data
217 | *.bim.layout
218 | *.bim_*.settings
219 |
220 | # Microsoft Fakes
221 | FakesAssemblies/
222 |
223 | # GhostDoc plugin setting file
224 | *.GhostDoc.xml
225 |
226 | # Node.js Tools for Visual Studio
227 | .ntvs_analysis.dat
228 |
229 | # Visual Studio 6 build log
230 | *.plg
231 |
232 | # Visual Studio 6 workspace options file
233 | *.opt
234 |
235 | # Visual Studio LightSwitch build output
236 | **/*.HTMLClient/GeneratedArtifacts
237 | **/*.DesktopClient/GeneratedArtifacts
238 | **/*.DesktopClient/ModelManifest.xml
239 | **/*.Server/GeneratedArtifacts
240 | **/*.Server/ModelManifest.xml
241 | _Pvt_Extensions
242 |
243 | # Paket dependency manager
244 | .paket/paket.exe
245 | paket-files/
246 |
247 | # FAKE - F# Make
248 | .fake/
249 |
250 | # JetBrains Rider
251 | .idea/
252 | *.sln.iml
253 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library/Renderers/CustomEntryRenderer.android.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using Android.Content.Res;
3 | using Android.Text;
4 | using Android.Widget;
5 | using CustomRenderers;
6 | using CustomRenderers.Droid.Extensions;
7 | using CustomRenderers.Droid.Renderers;
8 | using Java.Lang;
9 | using System.ComponentModel;
10 | using Xamarin.Forms;
11 | using Xamarin.Forms.Platform.Android;
12 |
13 | [assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
14 | namespace Library.Renderers.Android
15 | {
16 | public class CustomEntryRenderer : ViewRenderer, ITextWatcher
17 | {
18 | readonly int[][] ColorStates =
19 | {
20 | new[] { Android.Resource.Attribute.StateEnabled },
21 | new[] { -Android.Resource.Attribute.StateEnabled }
22 | };
23 |
24 | ColorStateList _defaultTextColors;
25 | ColorStateList _defaultPlaceholderColors;
26 |
27 | public CustomEntryRenderer(Context context) : base(context)
28 | {
29 |
30 | }
31 |
32 | protected override void OnElementChanged(ElementChangedEventArgs e)
33 | {
34 | base.OnElementChanged(e);
35 |
36 | if (e.OldElement == null)
37 | {
38 | EditText editText = new EditText(Context);
39 |
40 | _defaultTextColors = editText.TextColors;
41 | _defaultPlaceholderColors = editText.HintTextColors;
42 |
43 | SetNativeControl(editText);
44 | }
45 |
46 | UpdateText();
47 | UpdateTextColor();
48 | UpdatePlaceholder();
49 | UpdatePlaceholderColor();
50 | UpdateCharacterSpacing();
51 | UpdateHorizontalTextAlignment();
52 | UpdateVerticalTextAlignment();
53 | }
54 |
55 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
56 | {
57 | if (e.PropertyName == CustomEntry.TextProperty.PropertyName)
58 | UpdateText();
59 | else if (e.PropertyName == CustomEntry.TextColorProperty.PropertyName)
60 | UpdateTextColor();
61 | if (e.PropertyName == CustomEntry.PlaceholderProperty.PropertyName)
62 | UpdatePlaceholder();
63 | else if (e.PropertyName == Entry.PlaceholderColorProperty.PropertyName)
64 | UpdatePlaceholderColor();
65 | else if (e.PropertyName == Entry.CharacterSpacingProperty.PropertyName)
66 | UpdateCharacterSpacing();
67 | else if (e.PropertyName == Entry.HorizontalTextAlignmentProperty.PropertyName)
68 | UpdateHorizontalTextAlignment();
69 | else if (e.PropertyName == Entry.VerticalTextAlignmentProperty.PropertyName)
70 | UpdateVerticalTextAlignment();
71 |
72 | base.OnElementPropertyChanged(sender, e);
73 | }
74 |
75 | public void AfterTextChanged(IEditable s)
76 | {
77 |
78 | }
79 |
80 | public void BeforeTextChanged(ICharSequence s, int start, int count, int after)
81 | {
82 |
83 | }
84 |
85 | public void OnTextChanged(ICharSequence s, int start, int before, int count)
86 | {
87 | if (before == 0 && count == 0)
88 | return;
89 |
90 | Element.SendCompleted();
91 | }
92 |
93 | void UpdateText()
94 | {
95 | Control.Text = Element.Text;
96 | }
97 |
98 | void UpdateTextColor()
99 | {
100 | var textColor = Element.TextColor;
101 |
102 | if (textColor == null)
103 | {
104 | if (_defaultTextColors != null)
105 | Control.SetTextColor(_defaultTextColors);
106 | }
107 | else
108 | {
109 | var androidColor = textColor.ToAndroid();
110 |
111 | if (!Control.TextColors.IsOneColor(ColorStates, androidColor))
112 | {
113 | var acolor = androidColor.ToArgb();
114 | Control.SetTextColor(new ColorStateList(ColorStates, new[] { acolor, acolor }));
115 | }
116 | }
117 | }
118 |
119 | void UpdatePlaceholder()
120 | {
121 | if (Control.Hint == Element.Placeholder)
122 | return;
123 |
124 | Control.Hint = Element.Placeholder;
125 | }
126 |
127 | void UpdatePlaceholderColor()
128 | {
129 | var placeholderTextColor = Element.PlaceholderColor;
130 |
131 | if (placeholderTextColor == null)
132 | {
133 | Control.SetHintTextColor(_defaultPlaceholderColors);
134 | }
135 | else
136 | {
137 | var androidColor = placeholderTextColor.ToAndroid();
138 |
139 | if (!Control.HintTextColors.IsOneColor(ColorExtensions.States, androidColor))
140 | {
141 | var acolor = androidColor.ToArgb();
142 | Control.SetHintTextColor(new ColorStateList(ColorExtensions.States, new[] { acolor, acolor }));
143 | }
144 | }
145 | }
146 |
147 | void UpdateCharacterSpacing()
148 | {
149 | Control.LetterSpacing = Element.CharacterSpacing.ToEm();
150 | }
151 |
152 | void UpdateHorizontalTextAlignment()
153 | {
154 | Control.UpdateTextAlignment(Element.HorizontalTextAlignment, Element.VerticalTextAlignment);
155 | }
156 |
157 | void UpdateVerticalTextAlignment()
158 | {
159 | Control.UpdateTextAlignment(Element.HorizontalTextAlignment, Element.VerticalTextAlignment);
160 | }
161 | }
162 | }
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library/Platforms/Android/CustomEntryRenderer.cs:
--------------------------------------------------------------------------------
1 | using Android.Content;
2 | using Android.Content.Res;
3 | using Android.Text;
4 | using Android.Widget;
5 | using Java.Lang;
6 | using Library.Extensions.Android;
7 | using Library.Controls;
8 | using Library.Renderers.Android;
9 | using Microsoft.Maui.Controls.Compatibility;
10 | using Microsoft.Maui.Controls.Compatibility.Platform.Android;
11 | using Microsoft.Maui.Controls.Platform;
12 | using System.ComponentModel;
13 | using AResource = Android.Resource;
14 |
15 | [assembly: ExportRenderer(typeof(CustomEntry), typeof(CustomEntryRenderer))]
16 | namespace Library.Renderers.Android
17 | {
18 | public class CustomEntryRenderer : ViewRenderer, ITextWatcher
19 | {
20 | readonly int[][] ColorStates =
21 | {
22 | new[] { AResource.Attribute.StateEnabled },
23 | new[] { -AResource.Attribute.StateEnabled }
24 | };
25 |
26 | ColorStateList _defaultTextColors;
27 | ColorStateList _defaultPlaceholderColors;
28 |
29 | public CustomEntryRenderer(Context context) : base(context)
30 | {
31 |
32 | }
33 |
34 | protected override void OnElementChanged(ElementChangedEventArgs e)
35 | {
36 | base.OnElementChanged(e);
37 |
38 | if (e.OldElement == null)
39 | {
40 | EditText editText = new EditText(Context);
41 |
42 | _defaultTextColors = editText.TextColors;
43 | _defaultPlaceholderColors = editText.HintTextColors;
44 |
45 | SetNativeControl(editText);
46 | }
47 |
48 | UpdateText();
49 | UpdateTextColor();
50 | UpdatePlaceholder();
51 | UpdatePlaceholderColor();
52 | UpdateCharacterSpacing();
53 | UpdateHorizontalTextAlignment();
54 | UpdateVerticalTextAlignment();
55 | }
56 |
57 | protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
58 | {
59 | if (e.PropertyName == CustomEntry.TextProperty.PropertyName)
60 | UpdateText();
61 | else if (e.PropertyName == CustomEntry.TextColorProperty.PropertyName)
62 | UpdateTextColor();
63 | if (e.PropertyName == CustomEntry.PlaceholderProperty.PropertyName)
64 | UpdatePlaceholder();
65 | else if (e.PropertyName == Entry.PlaceholderColorProperty.PropertyName)
66 | UpdatePlaceholderColor();
67 | else if (e.PropertyName == Entry.CharacterSpacingProperty.PropertyName)
68 | UpdateCharacterSpacing();
69 | else if (e.PropertyName == Entry.HorizontalTextAlignmentProperty.PropertyName)
70 | UpdateHorizontalTextAlignment();
71 | else if (e.PropertyName == Entry.VerticalTextAlignmentProperty.PropertyName)
72 | UpdateVerticalTextAlignment();
73 |
74 | base.OnElementPropertyChanged(sender, e);
75 | }
76 |
77 | public void AfterTextChanged(IEditable s)
78 | {
79 |
80 | }
81 |
82 | public void BeforeTextChanged(ICharSequence s, int start, int count, int after)
83 | {
84 |
85 | }
86 |
87 | public void OnTextChanged(ICharSequence s, int start, int before, int count)
88 | {
89 | if (before == 0 && count == 0)
90 | return;
91 |
92 | Element.SendCompleted();
93 | }
94 |
95 | void UpdateText()
96 | {
97 | Control.Text = Element.Text;
98 | }
99 |
100 | void UpdateTextColor()
101 | {
102 | var textColor = Element.TextColor;
103 |
104 | if (textColor == null)
105 | {
106 | if (_defaultTextColors != null)
107 | Control.SetTextColor(_defaultTextColors);
108 | }
109 | else
110 | {
111 | var androidColor = textColor.ToAndroid();
112 |
113 | if (!Control.TextColors.IsOneColor(ColorStates, androidColor))
114 | {
115 | var acolor = androidColor.ToArgb();
116 | Control.SetTextColor(new ColorStateList(ColorStates, new[] { acolor, acolor }));
117 | }
118 | }
119 | }
120 |
121 | void UpdatePlaceholder()
122 | {
123 | if (Control.Hint == Element.Placeholder)
124 | return;
125 |
126 | Control.Hint = Element.Placeholder;
127 | }
128 |
129 | void UpdatePlaceholderColor()
130 | {
131 | var placeholderTextColor = Element.PlaceholderColor;
132 |
133 | if (placeholderTextColor == null)
134 | {
135 | Control.SetHintTextColor(_defaultPlaceholderColors);
136 | }
137 | else
138 | {
139 | var androidColor = placeholderTextColor.ToAndroid();
140 |
141 | if (!Control.HintTextColors.IsOneColor(ColorExtensions.States, androidColor))
142 | {
143 | var acolor = androidColor.ToArgb();
144 | Control.SetHintTextColor(new ColorStateList(ColorExtensions.States, new[] { acolor, acolor }));
145 | }
146 | }
147 | }
148 |
149 | void UpdateCharacterSpacing()
150 | {
151 | Control.LetterSpacing = Element.CharacterSpacing.ToEm();
152 | }
153 |
154 | void UpdateHorizontalTextAlignment()
155 | {
156 | Control.UpdateTextAlignment(Element.HorizontalTextAlignment, Element.VerticalTextAlignment);
157 | }
158 |
159 | void UpdateVerticalTextAlignment()
160 | {
161 | Control.UpdateTextAlignment(Element.HorizontalTextAlignment, Element.VerticalTextAlignment);
162 | }
163 | }
164 | }
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.Sample/Library.Sample.iOS/Library.Sample.iOS.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Debug
5 | iPhoneSimulator
6 | 8.0.30703
7 | 2.0
8 | {42922F97-13B5-4C52-98FA-C7086A811C0B}
9 | {FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10 | {6143fdea-f3c2-4a09-aafa-6e230626515e}
11 | Exe
12 | Library.Sample.iOS
13 | Resources
14 | Library.Sample.iOS
15 | true
16 | NSUrlSessionHandler
17 | automatic
18 |
19 |
20 | true
21 | portable
22 | false
23 | bin\iPhoneSimulator\Debug
24 | DEBUG
25 | prompt
26 | 4
27 | x86_64
28 | None
29 | true
30 |
31 |
32 | none
33 | true
34 | bin\iPhoneSimulator\Release
35 | prompt
36 | 4
37 | None
38 | x86_64
39 |
40 |
41 | true
42 | portable
43 | false
44 | bin\iPhone\Debug
45 | DEBUG
46 | prompt
47 | 4
48 | ARM64
49 | iPhone Developer
50 | true
51 | Entitlements.plist
52 | None
53 | -all
54 |
55 |
56 | none
57 | true
58 | bin\iPhone\Release
59 | prompt
60 | 4
61 | ARM64
62 | iPhone Developer
63 | Entitlements.plist
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | false
76 |
77 |
78 | false
79 |
80 |
81 | false
82 |
83 |
84 | false
85 |
86 |
87 | false
88 |
89 |
90 | false
91 |
92 |
93 | false
94 |
95 |
96 | false
97 |
98 |
99 | false
100 |
101 |
102 | false
103 |
104 |
105 | false
106 |
107 |
108 | false
109 |
110 |
111 | false
112 |
113 |
114 | false
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 | {d945db9a-d5d0-4da7-8a94-4fd93a0c8d56}
133 | Library
134 |
135 |
136 | {672FCC1D-0748-4C0E-A8DF-9418BEFC3896}
137 | Library.Sample
138 |
139 |
140 |
--------------------------------------------------------------------------------
/src/Xamarin.Forms/Library.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.2.32317.152
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library", "Library\Library.csproj", "{D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}"
7 | EndProject
8 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library.Sample.Android", "Library.Sample\Library.Sample.Android\Library.Sample.Android.csproj", "{2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}"
9 | EndProject
10 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Library.Sample.iOS", "Library.Sample\Library.Sample.iOS\Library.Sample.iOS.csproj", "{42922F97-13B5-4C52-98FA-C7086A811C0B}"
11 | EndProject
12 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Library.Sample", "Library.Sample\Library.Sample\Library.Sample.csproj", "{95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}"
13 | EndProject
14 | Global
15 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
16 | Debug|Any CPU = Debug|Any CPU
17 | Debug|ARM = Debug|ARM
18 | Debug|iPhone = Debug|iPhone
19 | Debug|iPhoneSimulator = Debug|iPhoneSimulator
20 | Debug|x64 = Debug|x64
21 | Debug|x86 = Debug|x86
22 | Release|Any CPU = Release|Any CPU
23 | Release|ARM = Release|ARM
24 | Release|iPhone = Release|iPhone
25 | Release|iPhoneSimulator = Release|iPhoneSimulator
26 | Release|x64 = Release|x64
27 | Release|x86 = Release|x86
28 | EndGlobalSection
29 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
30 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
31 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|Any CPU.Build.0 = Debug|Any CPU
32 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|ARM.ActiveCfg = Debug|Any CPU
33 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|ARM.Build.0 = Debug|Any CPU
34 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|iPhone.ActiveCfg = Debug|Any CPU
35 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|iPhone.Build.0 = Debug|Any CPU
36 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
37 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
38 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|x64.ActiveCfg = Debug|Any CPU
39 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|x64.Build.0 = Debug|Any CPU
40 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|x86.ActiveCfg = Debug|Any CPU
41 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Debug|x86.Build.0 = Debug|Any CPU
42 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|Any CPU.ActiveCfg = Release|Any CPU
43 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|Any CPU.Build.0 = Release|Any CPU
44 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|ARM.ActiveCfg = Release|Any CPU
45 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|ARM.Build.0 = Release|Any CPU
46 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|iPhone.ActiveCfg = Release|Any CPU
47 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|iPhone.Build.0 = Release|Any CPU
48 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
49 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
50 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|x64.ActiveCfg = Release|Any CPU
51 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|x64.Build.0 = Release|Any CPU
52 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|x86.ActiveCfg = Release|Any CPU
53 | {D945DB9A-D5D0-4DA7-8A94-4FD93A0C8D56}.Release|x86.Build.0 = Release|Any CPU
54 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
55 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
56 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
57 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|ARM.ActiveCfg = Debug|Any CPU
58 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|ARM.Build.0 = Debug|Any CPU
59 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|ARM.Deploy.0 = Debug|Any CPU
60 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|iPhone.ActiveCfg = Debug|Any CPU
61 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|iPhone.Build.0 = Debug|Any CPU
62 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|iPhone.Deploy.0 = Debug|Any CPU
63 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
64 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
65 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
66 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|x64.ActiveCfg = Debug|Any CPU
67 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|x64.Build.0 = Debug|Any CPU
68 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|x64.Deploy.0 = Debug|Any CPU
69 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|x86.ActiveCfg = Debug|Any CPU
70 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|x86.Build.0 = Debug|Any CPU
71 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Debug|x86.Deploy.0 = Debug|Any CPU
72 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
73 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|Any CPU.Build.0 = Release|Any CPU
74 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|Any CPU.Deploy.0 = Release|Any CPU
75 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|ARM.ActiveCfg = Release|Any CPU
76 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|ARM.Build.0 = Release|Any CPU
77 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|ARM.Deploy.0 = Release|Any CPU
78 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|iPhone.ActiveCfg = Release|Any CPU
79 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|iPhone.Build.0 = Release|Any CPU
80 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|iPhone.Deploy.0 = Release|Any CPU
81 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
82 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
83 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
84 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|x64.ActiveCfg = Release|Any CPU
85 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|x64.Build.0 = Release|Any CPU
86 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|x64.Deploy.0 = Release|Any CPU
87 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|x86.ActiveCfg = Release|Any CPU
88 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|x86.Build.0 = Release|Any CPU
89 | {2CD5DA6B-10F4-48C4-AE1F-C3EBBC47A5CE}.Release|x86.Deploy.0 = Release|Any CPU
90 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
91 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
92 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|ARM.ActiveCfg = Debug|iPhoneSimulator
93 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|ARM.Build.0 = Debug|iPhoneSimulator
94 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|iPhone.ActiveCfg = Debug|iPhone
95 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|iPhone.Build.0 = Debug|iPhone
96 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
97 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
98 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|x64.ActiveCfg = Debug|iPhoneSimulator
99 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|x64.Build.0 = Debug|iPhoneSimulator
100 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
101 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Debug|x86.Build.0 = Debug|iPhoneSimulator
102 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
103 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
104 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|ARM.ActiveCfg = Release|iPhoneSimulator
105 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|ARM.Build.0 = Release|iPhoneSimulator
106 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|iPhone.ActiveCfg = Release|iPhone
107 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|iPhone.Build.0 = Release|iPhone
108 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
109 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
110 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|x64.ActiveCfg = Release|iPhoneSimulator
111 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|x64.Build.0 = Release|iPhoneSimulator
112 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|x86.ActiveCfg = Release|iPhoneSimulator
113 | {42922F97-13B5-4C52-98FA-C7086A811C0B}.Release|x86.Build.0 = Release|iPhoneSimulator
114 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
115 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
116 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|ARM.ActiveCfg = Debug|Any CPU
117 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|ARM.Build.0 = Debug|Any CPU
118 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|iPhone.ActiveCfg = Debug|Any CPU
119 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|iPhone.Build.0 = Debug|Any CPU
120 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
121 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
122 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|x64.ActiveCfg = Debug|Any CPU
123 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|x64.Build.0 = Debug|Any CPU
124 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|x86.ActiveCfg = Debug|Any CPU
125 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Debug|x86.Build.0 = Debug|Any CPU
126 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
127 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|Any CPU.Build.0 = Release|Any CPU
128 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|ARM.ActiveCfg = Release|Any CPU
129 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|ARM.Build.0 = Release|Any CPU
130 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|iPhone.ActiveCfg = Release|Any CPU
131 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|iPhone.Build.0 = Release|Any CPU
132 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
133 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
134 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|x64.ActiveCfg = Release|Any CPU
135 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|x64.Build.0 = Release|Any CPU
136 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|x86.ActiveCfg = Release|Any CPU
137 | {95FC3BCA-6EE7-4B71-AF39-3BD500FB7CD1}.Release|x86.Build.0 = Release|Any CPU
138 | EndGlobalSection
139 | GlobalSection(SolutionProperties) = preSolution
140 | HideSolutionNode = FALSE
141 | EndGlobalSection
142 | GlobalSection(ExtensibilityGlobals) = postSolution
143 | SolutionGuid = {C167EF05-74C3-429A-BDBB-A7AB761DA0BF}
144 | EndGlobalSection
145 | EndGlobal
146 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Resources/Images/dotnet_bot.svg:
--------------------------------------------------------------------------------
1 |
94 |
--------------------------------------------------------------------------------
/src/.NET MAUI/Library/Library.Sample/Resources/Styles.xaml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | #512BD4
8 | #DFD8F7
9 | #2B0B98
10 | White
11 | Black
12 | #E5E5E1
13 | #969696
14 | #505050
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | #F7B548
26 | #FFD590
27 | #FFE5B9
28 | #28C2D1
29 | #7BDDEF
30 | #C3F2F4
31 | #3E8EED
32 | #72ACF1
33 | #A7CBF6
34 |
35 |
38 |
39 |
43 |
44 |
49 |
50 |
53 |
54 |
80 |
81 |
102 |
103 |
124 |
125 |
147 |
148 |
170 |
171 |
176 |
177 |
198 |
199 |
204 |
205 |
209 |
210 |
234 |
235 |
254 |
255 |
276 |
277 |
280 |
281 |
306 |
307 |
331 |
332 |
338 |
339 |
364 |
365 |
368 |
369 |
402 |
403 |
424 |
425 |
429 |
430 |
442 |
443 |
444 |
449 |
450 |
456 |
457 |
--------------------------------------------------------------------------------