Guest User

Untitled

a guest
Jun 25th, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. using System;
  2. using System.Runtime.CompilerServices;
  3. using Xamarin.Forms;
  4.  
  5. namespace samples.core.Controls
  6. {
  7. public class EntryMoveNextControl : Entry
  8. {
  9. public static readonly BindableProperty NextEntryProperty = BindableProperty.Create(nameof(NextEntry), typeof(View), typeof(Entry));
  10. public View NextEntry
  11. {
  12. get => (View)GetValue(NextEntryProperty);
  13. set => SetValue(NextEntryProperty, value);
  14. }
  15.  
  16. protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
  17. {
  18. base.OnPropertyChanged(propertyName);
  19.  
  20. this.Completed += (sender, e) =>
  21. {
  22. this.OnNext();
  23. };
  24. }
  25.  
  26. public void OnNext()
  27. {
  28. NextEntry?.Focus();
  29. }
  30. }
  31. }
Add Comment
Please, Sign In to add comment