我想在一個頁面上使用label
控件顯示近300行,但我只顯示第一個頂行,我正在使用下面的代碼,我如何顯示所有行,是label
合適的控件?爲什麼Xamarin.forms上的標籤不顯示所有文本?
Label testt = new Label { Text = MainPage.part1, VerticalOptions = LayoutOptions.CenterAndExpand, HorizontalOptions = LayoutOptions.CenterAndExpand, FontAttributes = FontAttributes.Bold, FontSize = 24, TextColor = Color.White };
StackLayout stacklayout = new StackLayout
{
Children = {
TitleOfBook,
testt
}
};
ScrollView scroll = new ScrollView
{
Content = stacklayout
,VerticalOptions=LayoutOptions.FillAndExpand,
HorizontalOptions=LayoutOptions.FillAndExpand
};
Content = scroll;
不,標籤不是適用於顯示300行文本的控件。編輯器甚至WebView將是一個更好的選擇。 – Jason
@jason使用編輯器時,文本顏色顯示爲灰色。:( –
WebView對我來說是更好的選擇..感謝 –