TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
amaro tati
NA
27
4.8k
How can I break the text in a Picker’s selection dialog wrap
Feb 27 2019 2:04 AM
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
Reply
Answers (
2
)
azure blob storage upload and delete get container
Payumoney integration in xamarin forms cross platforms