public MaterialEntry()
        {
            InitializeComponent();
            EntryField.BindingContext    = this;
            BottomBorder.BackgroundColor = DefaultColor;
            EntryField.TextChanged      += (s, a) =>
            {
                TextChanged?.Invoke(s, a);
            };

            EntryField.Focused += async(s, a) =>
            {
                EntryFocused?.Invoke(this, a);
                await CalculateLayoutFocused();
            };
            EntryField.Unfocused += async(s, a) =>
            {
                EntryUnfocused?.Invoke(this, a);
                await CalculateLayoutUnfocused();
            };
            EntryField.PropertyChanged += async(sender, args) =>
            {
                if (args.PropertyName == nameof(EntryField.Text) && !EntryField.IsFocused && !String.IsNullOrEmpty(EntryField.Text))
                {
                    await CalculateLayoutUnfocused();
                }
            };

            UpdateValidation();
        }
Exemple #2
0
        protected override void OnAppearing()
        {
            base.OnAppearing();

            EntryFocused.Focus();
        }