Hello,
Welcome to Microsoft Q&A!
This could be achieved with custom renderer .
For example
iOS Solution
[assembly: ExportRenderer(typeof(Label), typeof(MyLabelRenderer))]
namespace FormsA.iOS
{
public class MyLabelRenderer : LabelRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Label> e)
{
base.OnElementChanged(e);
if (Control != null)
{
string content = Control.Text;
NSMutableAttributedString attributedString = new NSMutableAttributedString(content);
NSMutableParagraphStyle paragraphStyle = new NSMutableParagraphStyle();
paragraphStyle.HyphenationFactor = 1.0f;
attributedString.AddAttribute(UIStringAttributeKey.ParagraphStyle, paragraphStyle, new NSRange(0, content.Length));
Control.AttributedText = attributedString;
}
}
}
}
Refer to https://stackoverflow.com/a/19414663/8187800 .
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.