protected override void OnElementChanged(ElementChangedEventArgs <Editor> e) { base.OnElementChanged(e); if (Control != null) { var element = (CustomControls.CustomEditor)e.NewElement; if (element == null) { return; } editor = element; Control.Loaded += Control_Loaded; Control.Foreground = new SolidColorBrush(Colors.White); Control.Text = element.WatermarkText; Control.GotFocus += Control_GotFocus; Control.VerticalContentAlignment = VerticalAlignment.Center; } }
protected override void OnElementChanged(ElementChangedEventArgs <Editor> e) { base.OnElementChanged(e); if (Control != null) { var element = (CustomControls.CustomEditor)e.NewElement; if (element == null) { return; } editor = element; Control.Loaded += Control_Loaded; Control.Foreground = new SolidColorBrush(Colors.Black); Control.Text = element.WatermarkText; Control.GotFocus += Control_GotFocus; if (Device.Idiom == TargetIdiom.Desktop) { Control.Height = 33; } Control.VerticalContentAlignment = VerticalAlignment.Center; Control.TextAlignment = Windows.UI.Xaml.TextAlignment.Center; } }