{"id":13709861,"url":"https://github.com/TheCodeTraveler/EntryCustomReturnPlugin","last_synced_at":"2025-05-06T18:33:07.724Z","repository":{"id":68231047,"uuid":"79738813","full_name":"brminnick/EntryCustomReturnPlugin","owner":"brminnick","description":"Xamarin.Forms Plugin to customize the Xamarin.Forms.Entry Keyboard Return Button","archived":true,"fork":false,"pushed_at":"2020-08-16T02:01:15.000Z","size":11471,"stargazers_count":81,"open_issues_count":1,"forks_count":11,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-04T22:08:56.147Z","etag":null,"topics":["nuget","xamarin","xamarin-android","xamarin-forms","xamarin-ios","xamarin-plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brminnick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-22T19:10:58.000Z","updated_at":"2023-01-28T13:13:59.000Z","dependencies_parsed_at":"2023-03-12T15:16:36.452Z","dependency_job_id":null,"html_url":"https://github.com/brminnick/EntryCustomReturnPlugin","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brminnick%2FEntryCustomReturnPlugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brminnick%2FEntryCustomReturnPlugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brminnick%2FEntryCustomReturnPlugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brminnick%2FEntryCustomReturnPlugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brminnick","download_url":"https://codeload.github.com/brminnick/EntryCustomReturnPlugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224521402,"owners_count":17325229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nuget","xamarin","xamarin-android","xamarin-forms","xamarin-ios","xamarin-plugin"],"created_at":"2024-08-02T23:00:47.401Z","updated_at":"2025-05-06T18:33:01.670Z","avatar_url":"https://github.com/brminnick.png","language":"C#","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Custom `Xamarin.Forms.Entry` Keyboard Return Button\n\n[![NuGet](https://buildstats.info/nuget/Xam.Plugins.Forms.CustomReturnEntry)](https://www.nuget.org/packages/Xam.Plugins.Forms.CustomReturnEntry/)\n\nThis SDK was [officially merged into Xamarin.Forms v3.1.0](https://devblogs.microsoft.com/xamarin/xamarin-forms-3-1-improvments?WT.mc_id=entrycustomreturnplugin-github-bramin).\n\nBecause this SDK supports Xamarin.Forms v2.5.0.280555, I will continue to maintain it for teams who have not yet upgraded to Xamarin.Forms v3.1.0 or higher.\n\nFor developers using Xamarin.Forms 3.1.0 or higher, I recommend removing this NuGet package from your `csproj` and using the APIs included in Xamarin.Forms: `Xamarin.Forms.Entry.ReturnType` \u0026 `Xamarin.Forms.Entry.ReturnCommand`.\n\n## ReturnType\n\n| ReturnType | Android | iOS | UWP |\n|--------------------|---------|-----|-----|\n| **Default**            |![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/Android/DefaultButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/iOS/DefaultButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/UWP/DefaultButton.png)|\n| **Done**            |![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/Android/DoneButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/iOS/DoneButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/UWP/DefaultButton.png)|\n| **Go**            |![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/Android/GoButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/iOS/GoButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/UWP/DefaultButton.png)|\n| **Next**            |![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/Android/NextButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/iOS/NextButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/UWP/DefaultButton.png)|\n| **Search**            |![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/Android/SearchButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/iOS/SearchButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/UWP/SearchButton.png)|\n| **Send**            |![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/Android/SendButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/iOS/SendButton.png)|![](https://github.com/brminnick/Videos/blob/master/EntryCustomReturnPlugin/Return%20Button%20Images/UWP/DefaultButton.png)|\n\n**Platform Support**\n\n|Platform|Supported|Version|\n| ------------------- | :-----------: | :------------------: |\n|Xamarin.iOS|Yes|iOS 8+|\n|Xamarin.iOS Unified|Yes|iOS 8+|\n|Xamarin.Android|Yes|API 15+|\n|Windows 10 UWP|Yes|10+|\n|Windows Phone Silverlight|No||\n|Windows Phone RT|No||\n|Windows Store RT|No||\n|Xamarin.Mac|No||\n\nThis plugin can be consumed as a [`CustomRenderer Control`](./README.md#usage-in-xamarinforms-project-as-a-custom-control) or as an [`Effect`](./README.md#usage-in-xamarinforms-project-as-an-effect).\n\n# Setup\n\n* Available on NuGet: https://www.nuget.org/packages/Xam.Plugins.Forms.CustomReturnEntry/ [![NuGet](https://buildstats.info/nuget/Xam.Plugins.Forms.CustomReturnEntry)](https://www.nuget.org/packages/Xam.Plugins.Forms.CustomReturnEntry/)\n* Install into your PCL project and Client projects.\n\n## iOS\n\nIn the `FinishedLaunching` method of `AppDelegate.cs`, add `CustomReturnEntryRenderer.Init();`:\n\n```csharp\npublic partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate\n{\n    public override bool FinishedLaunching(UIApplication app, NSDictionary options)\n    {\n        ...\n\n        global::Xamarin.Forms.Forms.Init();\n        \n        EntryCustomReturn.Forms.Plugin.iOS.CustomReturnEntryRenderer.Init();\n\n        ...\n    }\n}\n```\n\n**Note:** You must call  `EntryCustomReturn.Forms.Plugin.iOS.CustomReturnEntryRenderer.Init();` *after* you call `global::Xamarin.Forms.Forms.Init();`\n\n## Android\n\nIn the `Oncreated` method of `MainActivity.cs`, add `CustomReturnEntryRenderer.Init();`:\n\n```csharp\npublic class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity\n{\n    protected override void OnCreate(Bundle bundle)\n    {\n        ...\n\n        global::Xamarin.Forms.Forms.Init(this, bundle);\n\n        EntryCustomReturn.Forms.Plugin.Android.CustomReturnEntryRenderer.Init();\n\n        ...\n    }\n}\n```\n\n**Note:** You must call  `EntryCustomReturn.Forms.Plugin.Android.CustomReturnEntryRenderer.Init();` *after* you call `global::Xamarin.Forms.Forms.Init(this, bundle);`\n\n## UWP\n\nIn the `OnLaunched` method of `App.xaml.cs`, add `CustomReturnEntryRenderer.Init();`:\n\n```csharp\npublic partial class App : Application\n{\n    protected override void OnLaunched(LaunchActivatedEventArgs e)\n    {\n        ...\n\n        global::Xamarin.Forms.Forms.Init(e);\n\n        EntryCustomReturn.Forms.Plugin.UWP.CustomReturnEntryRenderer.Init();\n\n        ...\n    }\n}\n```\n\n**Note:** You must call  `EntryCustomReturn.Forms.Plugin.UWP.CustomReturnEntryRenderer.Init();` *after* you call `global::Xamarin.Forms.Forms.Init(e);`\n\n# Usage in Xamarin.Forms Project as a Custom Control\n\nThis plugin can be consumed as a [`CustomRenderer Control`](./README.md#usage-in-xamarinforms-project-as-a-custom-control) or as an [`Effect`](./README.md#usage-in-xamarinforms-project-as-an-effect).\n\n## 1. Set the `ReturnType` Property\n\nThe `ReturnType` property is an enum containing 6 different types: Default, Go, Next, Done, Send, Search.\n\n#### Coded UI\n\n```csharp\nvar goReturnTypeCustomEntry = new CustomReturnEntry\n{\n    ReturnType = EntryCustomReturn.Forms.Plugin.Abstractions.ReturnType.Go\n};\n```\n\n#### XAML UI\n\n```xml\n\u003cContentPage\n    xmlns=\"http://xamarin.com/schemas/2014/forms\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n    x:Class=\"SimpleXamlSample.CustomRendererPage\"\n    xmlns:entryCustomReturn=\"clr-namespace:EntryCustomReturn.Forms.Plugin.Abstractions;assembly=EntryCustomReturn.Forms.Plugin.Abstractions\"\u003e\n\n    \u003cContentPage.Content\u003e\n\n        \u003centryCustomReturn:CustomReturnEntry\n            x:Name = \"MyCustomReturnEntry\"\n            HorizontalOptions=\"Center\"\n            VerticalOptions=\"Center\"\n            ReturnType=\"Go\"/\u003e\n\n    \u003c/ContentPage.Content\u003e\n\u003c/ContentPage\u003e\n```\n\n### Bindable Property\n\n`ReturnType` can also be used as a `Bindable Property` to bind to a ViewModel\n\n#### Coded UI\n\n```csharp\nvar viewModel = new MyViewModel();\nBindingContext = viewModel;\n\nvar customReturnEntry = new CustomReturnEntry();\ncustomReturnEntry.SetBinding(CustomReturnEntry.ReturnTypeProperty, nameof(MyViewModel.EntryReturnType));\n```\n\n#### XAML UI\n\n```xml\n\u003centryCustomReturn:CustomReturnEntry\n    x:Name = \"MyCustomReturnEntry\"\n    HorizontalOptions=\"Center\"\n    VerticalOptions=\"Center\"\n    ReturnType=\"{Binding EntryReturnType}\"/\u003e\n```\n\n## 2. Set the `ReturnCommand` Command\n\n`ReturnCommand` will fire when the user finalizes the text in an entry with the return key.\n\n#### Coded UI\n\n```csharp\ngoReturnTypeCustomEntry.ReturnCommand = new Command(() =\u003e Navigation.PushAsync(new ContentPage()));\n```\n\n#### XAML UI\nUse the [Coded UI example above](./README.md#coded-ui-2) to initialize a `Command` in the XAML Code Behind\n\n### Bindable Property\n\n`ReturnCommand` can also be used as a `Bindable Property` to bind to a ViewModel\n\n#### Coded UI\n\n```csharp\nvar viewModel = new MyViewModel();\nBindingContext = viewModel;\n\nvar customReturnEntry = new CustomReturnEntry();\ncustomReturnEntry.SetBinding(CustomReturnEntry.ReturnCommandProperty nameof(MyViewModel.EntryReturnCommand));\n```\n\n#### XAML UI\n\n```xml\n\u003cContentPage\n    xmlns=\"http://xamarin.com/schemas/2014/forms\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n    xmlns:local=\"clr-namespace:SimpleXamlSample\"\n    x:Class=\"SimpleXamlSample.CustomRendererPage\"\n    xmlns:entryCustomReturn=\"clr-namespace:EntryCustomReturn.Forms.Plugin.Abstractions;assembly=EntryCustomReturn.Forms.Plugin.Abstractions\"\n    BindingContext=\"{Binding Source={local:MyViewModel}}\"\u003e\n\n    \u003cContentPage.Content\u003e\n\n        \u003centryCustomReturn:CustomReturnEntry\n            x:Name = \"MyCustomReturnEntry\"\n            HorizontalOptions=\"Center\"\n            VerticalOptions=\"Center\"\n            ReturnCommand=\"{Binding EntryReturnCommand}\"/\u003e\n\n    \u003c/ContentPage.Content\u003e\n\u003c/ContentPage\u003e\n```\n\n### 3. Set the `ReturnCommandParameter` Property\n\nThe `ReturnCommandParameter` property is an object that can be passed to the `ReturnCommand` property.\n\n#### Coded UI\n\n```csharp\ngoReturnTypeCustomEntry.ReturnCommand = new Command\u003cstring\u003e(async title =\u003e await DisplayAlert(title, \"\", \"Ok\"));\ngoReturnTypeCustomEntry.ReturnCommandParameter = \"Return Button Tapped\";\n```\n\n#### XAML UI\n\n```xml\n\u003cContentPage\n    xmlns=\"http://xamarin.com/schemas/2014/forms\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n    x:Class=\"SimpleXamlSample.CustomRendererPage\"\n    xmlns:entryCustomReturn=\"clr-namespace:EntryCustomReturn.Forms.Plugin.Abstractions;assembly=EntryCustomReturn.Forms.Plugin.Abstractions\"\u003e\n\n    \u003cContentPage.Content\u003e\n\n        \u003centryCustomReturn:CustomReturnEntry\n            x:Name = \"MyCustomReturnEntry\"\n            HorizontalOptions=\"Center\"\n            VerticalOptions=\"Center\"\n            ReturnCommandParameter=\"Return Button Tapped\"/\u003e\n\n    \u003c/ContentPage.Content\u003e\n\u003c/ContentPage\u003e\n```\n\n### Bindable Property\n\n`ReturnCommandParameter` can also be used as a `Bindable Property` to bind to a ViewModel\n\n#### Coded UI\n\n```csharp\nvar viewModel = new MyViewModel();\nBindingContext = viewModel;\n\nvar customReturnEntry = new CustomReturnEntry();\ncustomReturnEntry.SetBinding(CustomReturnEntry.ReturnCommandParameterProperty, nameof(MyViewModel.EntryReturnCommandParameter));\n```\n\n#### XAML UI\n\n```xml\n\n\u003centryCustomReturn:CustomReturnEntry\n    x:Name = \"MyCustomReturnEntry\"\n    HorizontalOptions=\"Center\"\n    VerticalOptions=\"Center\"\n    ReturnCommandParameter=\"{Binding EntryReturnCommandParameter}\"/\u003e\n```\n\n# Usage in Xamarin.Forms Project as an Effect\n\nThis plugin can be consumed as a [`CustomRenderer Control`](./README.md#usage-in-xamarinforms-project-as-a-custom-control) or as an [`Effect`](./README.md#usage-in-xamarinforms-project-as-an-effect).\n\n## 1. Set the `ReturnType` Property\n\nThe `ReturnType` property is an enum containing 6 different types: Default, Go, Next, Done, Send, Search.\n\n#### Coded UI\n\n```csharp\nvar goReturnTypeEntry = new Entry()\nCustomReturnEffect.SetReturnType(goReturnTypeEntry, EntryCustomReturn.Forms.Plugin.Abstractions.ReturnType.Go);\n```\n\n#### XAML UI\n\n```xml\n\u003cContentPage\n    xmlns=\"http://xamarin.com/schemas/2014/forms\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n    x:Class=\"SimpleXamlSample.CustomRendererPage\"\n    xmlns:entryCustomReturn=\"clr-namespace:EntryCustomReturn.Forms.Plugin.Abstractions;assembly=EntryCustomReturn.Forms.Plugin.Abstractions\"\u003e\n\n    \u003cContentPage.Content\u003e\n\n        \u003cEntry\n            x:Name = \"GoReturnTypeEntry\"\n            HorizontalOptions=\"Center\"\n            VerticalOptions=\"Center\"\n            entryCustomReturn:CustomReturnEffect.ReturnType=\"{x:Static entryCustomReturn:ReturnType.Default}\"/\u003e\n\n\n    \u003c/ContentPage.Content\u003e\n\u003c/ContentPage\u003e\n```\n\n### Bindable Property\n\n`ReturnType` can also be used as a `Bindable Property` to bind to a ViewModel\n\n#### Coded UI\n\n```csharp\nvar viewModel = new MyViewModel();\nBindingContext = viewModel;\n\nvar customReturnEntry = new Entry();\ncustomReturnEntry.SetBinding(CustomReturnEffect.ReturnTypeProperty, nameof(MyViewModel.EntryReturnType));\n```\n\n#### XAML UI\n\n```xml\n\u003cEntry\n    x:Name = \"GoReturnTypeEntry\"\n    HorizontalOptions=\"Center\"\n    VerticalOptions=\"Center\"\n    entryCustomReturn:CustomReturnEffect.ReturnType=\"{Binding EntryReturnType}\"/\u003e\n```\n\n### 2. Set the `ReturnCommand` Command\n\n`ReturnCommand` will fire when the user finalizes the text in an entry with the return key.\n\n#### Coded UI\n\n```csharp\nvar goReturnTypeEntry = new Entry()\nCustomReturnEffect.SetReturnCommand(goReturnTypeEntry, new Command(() =\u003e Navigation.PushAsync(new ContentPage()));\n```\n\n#### XAML UI\n\nUse the [Coded UI example above](./README.md#coded-ui-8) to initialize a `Command` in the XAML Code Behind\n\n### Bindable Property\n\n`ReturnCommand` can also be used as a `Bindable Property` to bind to a ViewModel\n\n#### Coded UI\n\n```csharp\nvar viewModel = new MyViewModel();\nBindingContext = viewModel;\n\nvar customReturnEntry = new Entry();\ncustomReturnEntry.SetBinding(CustomReturnEffect.ReturnCommandProperty, nameof(MyViewModel.EntryReturnCommand));\n```\n\n#### XAML UI\n\n```xml\n\u003cContentPage\n    xmlns=\"http://xamarin.com/schemas/2014/forms\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n    xmlns:local=\"SimpleXamlSample\"\n    x:Class=\"SimpleXamlSample.CustomRendererPage\"\n    xmlns:entryCustomReturn=\"clr-namespace:EntryCustomReturn.Forms.Plugin.Abstractions;assembly=EntryCustomReturn.Forms.Plugin.Abstractions\"\n    BindingContext=\"{Binding Source={local:MyViewModel}}\"\u003e\n\n    \u003cContentPage.Content\u003e\n\n        \u003centryCustomReturn:CustomReturnEntry\n            x:Name = \"MyCustomReturnEntry\"\n            HorizontalOptions=\"Center\"\n            VerticalOptions=\"Center\"\n            entryCustomReturn:CustomReturnEffect.ReturnCommand=\"{Binding EntryReturnCommand}\"/\u003e\n\n    \u003c/ContentPage.Content\u003e\n\u003c/ContentPage\u003e\n```\n\n### 3. Set the `ReturnCommandParameter` Property\n\nThe `ReturnCommandParameter` property is an object that can be passed to the `ReturnCommand` property.\n\n#### Coded UI\n\n```csharp\nvar goReturnTypeEntry = new Entry()\nCustomReturnEffect.SetReturnCommand(goReturnTypeEntry, new Command\u003cstring\u003e(async title =\u003e await DisplayAlert(title, \"\", \"Ok\")));\nCustomReturnEffect.SetReturnCommandParameter(goReturnTypeEntry, \"Return Button Tapped\");\n```\n\n#### XAML UI\n\n```xml\n\u003cContentPage\n    xmlns=\"http://xamarin.com/schemas/2014/forms\"\n    xmlns:x=\"http://schemas.microsoft.com/winfx/2009/xaml\"\n    x:Class=\"SimpleXamlSample.CustomRendererPage\"\n    xmlns:entryCustomReturn=\"clr-namespace:EntryCustomReturn.Forms.Plugin.Abstractions;assembly=EntryCustomReturn.Forms.Plugin.Abstractions\"\u003e\n\n    \u003cContentPage.Content\u003e\n\n        \u003centryCustomReturn:CustomReturnEntry\n            x:Name = \"MyCustomReturnEntry\"\n            HorizontalOptions=\"Center\"\n            VerticalOptions=\"Center\"\n            entryCustomReturn:CustomReturnEffect.ReturnCommandParameter=\"Return Button Tapped\"/\u003e\n\n    \u003c/ContentPage.Content\u003e\n\u003c/ContentPage\u003e\n```\n\n### Bindable Property\n\n`ReturnCommandParameter` can also be used as a `Bindable Property` to bind to a ViewModel\n\n#### Coded UI\n\n```csharp\nvar viewModel = new MyViewModel();\nBindingContext = viewModel;\n\nvar customReturnEntry = new Entry();\ncustomReturnEntry.SetBinding(CustomReturnEffect.ReturnCommandParameterProperty, nameof(MyViewModel.EntryReturnCommandParameter));\n```\n\n#### XAML UI\n\n```xml\n\u003centryCustomReturn:CustomReturnEntry\n    x:Name = \"MyCustomReturnEntry\"\n    HorizontalOptions=\"Center\"\n    VerticalOptions=\"Center\"\n    entryCustomReturn:CustomReturnEffect.ReturnCommandParameter=\"{Binding EntryReturnCommandParameter}\"/\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheCodeTraveler%2FEntryCustomReturnPlugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTheCodeTraveler%2FEntryCustomReturnPlugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTheCodeTraveler%2FEntryCustomReturnPlugin/lists"}