public class CustomTIL : SfTextInputLayout { public new Thickness InputViewPadding { get { return (Thickness)GetValue(InputViewPaddingProperty); } set { SetValue(InputViewPaddingProperty, value); } } public new static readonly BindableProperty InputViewPaddingProperty = BindableProperty.Create("InputViewPadding", typeof(Thickness), typeof(SfTextInputLayout), new Thickness(-1, -1, -1, -1), BindingMode.Default, null, OnInputViewPaddingPropertyChanged); private static void OnInputViewPaddingPropertyChanged(BindableObject bindable, object oldValue, object newValue) { (bindable as CustomTIL).OnInputViewPaddingPropertyChanged(oldValue, newValue); } private void OnInputViewPaddingPropertyChanged(object oldValue, object newValue) { var newThickness = (Thickness)newValue; base.InputViewPadding = newThickness; if (Device.RuntimePlatform == Device.iOS) { var container = (this.Children[0] as StackLayout).Children[0] as Grid; container.RowDefinitions[0].Height = newThickness.Top; container.RowDefinitions[2].Height = newThickness.Bottom; } } } |