Join GitHub today
[Enhancement] Entry: Read-only entry #1678
Currently you can set an Entry and Editor to IsEnabled false which technically makes it Read Only but it's greyed out. Is Read Only would present the field so it looks the same when it's editable but now it's not editable.
Add IsReadonly property to InputView (base class of Entry and Editor)
public static readonly BindableProperty IsReadOnlyProperty = BindableProperty.Create(nameof(IsReadOnly), typeof(bool), defaultValue: false);
Renderers will make the platform native entry field uneditable but how it looks will not change
Currently the Entry and Editor controls inherit form InputView so need to verify that this enhancement works for both an Entry and Editor
Implications for CSS
This is adding a new property so should be backwards compatible. Need to ensure that the property defaults to false.
Difficulty : Easy
This is an easy change and great for a first time contributor.
On Android you can use:
These will prevent text from being edited without changing the respective controls' appearances.