private void UpdateStrikeThrough(TransparentEntry entry) { var text = new NSMutableAttributedString(Control.AttributedText); text.SetAttributes(new UIStringAttributes { StrikethroughStyle = entry?.IsStrikeThrough == true ? NSUnderlineStyle.Single : NSUnderlineStyle.None }, new NSRange(0, text.Length)); Control.AttributedText = text; }
private void UpdateStrikeThrough(TransparentEntry entry) { if (entry?.IsStrikeThrough == true) { Control.PaintFlags |= PaintFlags.StrikeThruText; } else { Control.PaintFlags &= ~PaintFlags.StrikeThruText; } }
protected override void OnElementChanged(ElementChangedEventArgs <Entry> e) { base.OnElementChanged(e); if (Control != null) { fControl = (TransparentEntry)Element; nControl = this.Control; //Control.Background = Resources.GetDrawable(Resource.Drawable.RoundedEntry); //Control.SetBackgroundColor(Color.Transparent.ToAndroid()); Control.SetBackgroundColor(Android.Graphics.Color.Transparent); Control.SetPadding(1, 3, 1, 1); Control.SetImeActionLabel("Go", Android.Views.InputMethods.ImeAction.Done); } }
protected override void OnElementChanged(ElementChangedEventArgs <Entry> e) { base.OnElementChanged(e); if (Control != null) { Control.SpellCheckingType = UITextSpellCheckingType.No; // No Spellchecking Control.AutocorrectionType = UITextAutocorrectionType.No; // No Autocorrection Control.AutocapitalizationType = UITextAutocapitalizationType.None; // No Autocapitalization } fControl = (TransparentEntry)Element; nControl = this.Control; nControl.ReturnKeyType = UIReturnKeyType.Go; this.Control.Layer.CornerRadius = 1; this.Control.BackgroundColor = UIColor.Clear; this.Control.Layer.BorderWidth = 0; this.Control.Layer.BorderColor = UIColor.Clear.CGColor; this.Control.BorderStyle = UITextBorderStyle.None; }
private void UpdateStrikeThrough(TransparentEntry entry) { // strikethrough effect not supported yet }