我在屏幕上显示label
,但是label
的字符串太长,它隐藏了我的屏幕的一部分。我想自定义或替换label
进行布局,使其布局与Local Notifications
(https://docs.microsoft.com/en-us/xamarin/android/app-fundamentals/notifications/local-notifications#expanded-layouts)相同
如何使用“ long string
”将short string
折叠为...
?
我正在使用Xamarin Forms 3.4版。
请帮助我!谢谢!
答案 0 :(得分:0)
您可以像这样使用Label的LineBreakMode
属性。
var lblDetail = new Label
{
LineBreakMode = LineBreakMode.TailTruncation,
Text = "a really long string that should show 2 lines then ..."
};