我試圖在標籤Xamarin窗體對齊文本但想不出,
如何將文本證明(未定型證明專用)同樣喜歡的圖片,而無需使用的WebView
我重視我的代碼,但其使用標籤左對齊只證明在標籤文本xamarin形成
string strText="MY LONG TEXT IS GOING HERE";
var lblMSG = new Label {TextColor = Color.Black };
lblMSG.Text=strText;
lblMSG.LineBreakMode = LineBreakMode.WordWrap;
lblMSG.HorizontalOptions = LayoutOptions.Fill;
lblMSG.HorizontalTextAlignment = TextAlignment.Start;
lblMSG.VerticalTextAlignment = TextAlignment.Center;
StackLayout stk= new StackLayout { Children = { lblMSG}, BackgroundColor = Color.White ,HorizontalOptions =LayoutOptions.FillAndExpand }
你的意思的造型文本?如果是的話,你需要手動完成。 –
沒有造型只證明 - 對於造型我使用FormattedString() –
「lblMSG.HorizontalTextAlignment = TextAlignment.Start;」使文本從左側開始。嘗試將其更改爲TextAlignment.Center。 –