Tutorial by Examples

Below is an example of a pure Xamarin Forms custom control. No custom rendering is being done for this but could easily be implemented, in fact, in my own code, I use this very same control along with a custom renderer for both the Label and Entry. The custom control is a ContentView with a Label, ...
I created custom label with wrapper around FormattedText property: public class MultiComponentLabel : Label { public IList<TextComponent> Components { get; set; } public MultiComponentLabel() { var components = new ObservableCollection<TextComponent>(); ...
The Xamarin Forms Entry control does not have a MaxLength property. To achieve this you can extend Entry as below, by adding a Bindable MaxLength property. Then you just need to subscribe to the TextChanged event on Entry and validate the length of the Text when this is called: class CustomEntry ...

Page 1 of 1