Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LeoJHarris/EnhancedEntry
Extended Xamarin Forms Entry with custom behaviours.
https://github.com/LeoJHarris/EnhancedEntry
android dotnet ios xamarin xamarin-forms
Last synced: 30 days ago
JSON representation
Extended Xamarin Forms Entry with custom behaviours.
- Host: GitHub
- URL: https://github.com/LeoJHarris/EnhancedEntry
- Owner: LeoJHarris
- License: mit
- Created: 2017-08-01T08:54:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-10-18T01:01:50.000Z (about 5 years ago)
- Last Synced: 2024-05-14T00:37:38.621Z (7 months ago)
- Topics: android, dotnet, ios, xamarin, xamarin-forms
- Language: C#
- Homepage: https://www.nuget.org/packages/LeoJHarris.XForms.Plugin.EnhancedEntry
- Size: 7.02 MB
- Stars: 65
- Watchers: 8
- Forks: 16
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xamarin-forms - EnhancedEntry ★67
README
**Enhanced Entry for Xamarin Forms**
[![Build Status](https://www.bitrise.io/app/7f1dafa3432c4b0f/status.svg?token=q5DIlKQd3GcOeNAipGvxKQ&branch=master)](https://www.bitrise.io/app/7f1dafa3432c4b0f)
A simple extended Xamarin Forms Entry with custom behaviours.
**Setup**
Available on NuGet: https://www.nuget.org/packages/LeoJHarris.XForms.Plugin.EnhancedEntry NuGet Install into your Xamarin.Forms project including client project i.e. .Android, .iOS etc.
**Gif Demo**
![EnhancedEntry Gif](https://github.com/LeoJHarris/EnhancedEntry/blob/master/assets/android_gif.gif)
**Sample Code**
https://github.com/LeoJHarris/EnhancedEntry/blob/master/SampleApp/SampleApp/Page1.xaml.cs
**Usage**
You must do this AFTER you call Xamarin.Forms.Init();
_In your Android_
```csharp
Xamarin.Forms.Init();
LeoJHarris.FormsPlugin.Droid.EnhancedEntryRenderer.Init(this);
```
_In your iOS_```csharp
Xamarin.Forms.Forms.Init();
LeoJHarris.FormsPlugin.iOS.EnhancedEntryRenderer.Init();
LoadApplication(new App());
```
**XAML**First add the xmlns namespace:
```csharp
xmlns:enhancedEntry="clr-namespace:LeoJHarris.FormsPlugin.Abstractions;assembly=LeoJHarris.FormsPlugin.Abstractions"
```Then add the xaml (or just use the code behind)
**Bindable Properties*** `LeftIcon`
Places an icon to the left inside the entry, icons to be placed inside respective drawable folders and iOS in the resources files, set the `PaddingLeftIcon` for padding space between icon and entry text.
* `BorderWidth`
Must be set for respective bindables such as `CornerRadius`, `FocusBorderColor` etc.
* `FocusBorderColor`
When the entry has focus otherwise the `BorderColor` will be set when off focus.
* `BackgroundColor`
* `LeftPadding, TopBottomPadding and RightPadding`
Desired padding between the Entry text and the edge of the Entry.
* `ReturnKeyType`Displayed for the keyboard action button. Run time exception will be thrown if unsupported on platform.
* `NextEntry`
Entry that will be given focus when keyboard action button pressed and keyboard `ReturnKeyType` is type - Next, otherwise if `GoToNextEntryOnLengthBehaviour` has been added and condition is satisfied.
* `KeyBoardAction`
Given command parameter to execute when keyboard action button pressed and `ReturnKeyType` is type - Done.
**Custom Behaviours**
* `PasswordCompareValidationBehavior`
Compare entries given some condition checks. Each entry should contain in the collection `PasswordCompareValidation` the entries to compare (see examples above), additional bindable properties include `ValidColor` and `InValidColor` that apply if there is or isn't a match between the collection of Entries.
PLEASE NOTE: Although these bindable properties are set per entry, they should all have the same values for all entries to check in the collection. You are able to set the `MinimumLength` of the passwords. Currently the password validation requires an uppercase, lowercase and a number, therefore the minimum length can be set.
* `EmailValidatorBehavior`
Used for emails. The `EmailRegularExpression` bindable property can be overridden if desired.
* `GoToNextEntryOnLengthBehaviour`
Sets focus to the `NextEntry` on the given `CharacterLength`. In addition required to set `MaxLengthValidator` i.e. MaxLength="1" to ensure that the entry doesn't exceed the `CharacterLength`
* `ShowHiddenEntryEffect`
Toggles visibility of text with type password. Use `Effects = { new ShowHiddenEntryEffect() }`
* `MaskedBehavior`
Applies a mask to the Entry. Bindable properties InValidColor and ValidColor can be set to update the color for of the drawable image within the Entry. Please set `LeftIcon` to enable this. Refer to docs.
**License**
Licensed under MIT, see license file
As with any open source project if you see improvements feel free to add your PR's