Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Runtime.CompilerServices;
- using Xamarin.Forms;
- namespace samples.core.Controls
- {
- public class EntryMoveNextControl : Entry
- {
- public static readonly BindableProperty NextEntryProperty = BindableProperty.Create(nameof(NextEntry), typeof(View), typeof(Entry));
- public View NextEntry
- {
- get => (View)GetValue(NextEntryProperty);
- set => SetValue(NextEntryProperty, value);
- }
- protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
- {
- base.OnPropertyChanged(propertyName);
- this.Completed += (sender, e) =>
- {
- this.OnNext();
- };
- }
- public void OnNext()
- {
- NextEntry?.Focus();
- }
- }
- }
Add Comment
Please, Sign In to add comment