I'm working with Xamarin.Forms, and the problem that I'm running into is wrapping text in the selection dialog
When the text very long exceeds the limit and does not show the rest of the text, I want to intend to break line when the text is long
- public class CustomPickerRenderer : PickerRenderer
- {
- public CustomPickerRenderer(Context context) : base(context) { }
- CustomPicker element;
- protected override void OnElementChanged(ElementChangedEventArgs
e) - {
- base.OnElementChanged(e);
- element = (CustomPicker)this.Element;
- if (Control != null && this.Element != null) ;
- var et = this.Control as EditText;
- Control.SetMaxLines(3);
- Control.Ellipsize = TextUtils.TruncateAt.End;
- Control.SetTextSize(Android.Util.ComplexUnitType.Sp, 15f);
- Control.SetSingleLine(false);
- // et.SetSingleLine(true);
- }
- }
This is my code

Muthu KumarRank #935 · 2.2K reputationPosted Mar 3, 2019, 6:45 PM EST
I think you have already asked same question in xamarin forum.
https://forums.xamarin.com/discussion/150885/how-can-i-break-the-text-in-a-pickers-selection-dialog-wrap-when-too-long
Muthu KumarRank #935 · 2.2K reputationPosted Mar 3, 2019, 6:45 PM EST
https://github.com/xamarin/Xamarin.Forms/issues/3634
Here mentioned the solution page,
https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.WPF/Themes/FormsContentDialog.xaml