protected override void OnElementChanged(ElementChangedEventArgs <View> e) { base.OnElementChanged(e); var view = (Label)Element; if (view == null) { return; } view.VerticalOptions = LayoutOptions.Center; UITextView uiLabel = new UITextView(new CGRect(0, 0, view.Width, view.Height)); SetNativeControl(uiLabel); switch (view.HorizontalTextAlignment) { case TextAlignment.Center: uiLabel.TextAlignment = UITextAlignment.Center; break; case TextAlignment.Start: uiLabel.TextAlignment = UITextAlignment.Left; break; case TextAlignment.End: uiLabel.TextAlignment = UITextAlignment.Right; break; } uiLabel.TextContainer.LineFragmentPadding = 0; uiLabel.TextContainerInset = UIEdgeInsets.Zero; uiLabel.ShouldInteractWithUrl += (tView, req, type) => { try { UIApplication.SharedApplication.OpenUrl(req); } catch (Exception ex) { Console.WriteLine(ex.ToString()); } return(true); }; uiLabel.BackgroundColor = view.BackgroundColor.ToUIColor(); uiLabel.ClearsContextBeforeDrawing = true; uiLabel.ClearsOnInsertion = true; uiLabel.AutosizesSubviews = true; uiLabel.TextColor = view.TextColor.ToUIColor(); uiLabel.Font = UIFont.SystemFontOfSize((float)view.FontSize); uiLabel.DataDetectorTypes = UIDataDetectorType.Link; uiLabel.Editable = false; uiLabel.UserInteractionEnabled = true; uiLabel.NeedsUpdateConstraints(); uiLabel.SetNeedsLayout(); if (view != null) { SetUIText(view); } }