|
|
|
@ -17,13 +17,30 @@ namespace XamarinStudy.Views |
|
|
|
|
changeBackgroundColorButton.Clicked += ChangeBackgroundColorButton_Clicked; |
|
|
|
|
Label label1 = new Label() { Text = "CS Label", TextColor = Color.Red, BackgroundColor = Color.DeepSkyBlue, FontSize = Device.GetNamedSize(NamedSize.Large, typeof(Label)) }; |
|
|
|
|
Label label2 = new Label() { Text = "CS 20 Label", TextColor = Color.Red, BackgroundColor = Color.DeepSkyBlue, FontSize = 30 }; |
|
|
|
|
Editor editor = new Editor() |
|
|
|
|
{ |
|
|
|
|
Placeholder = "Multi-line input", |
|
|
|
|
HeightRequest = 300 |
|
|
|
|
}; |
|
|
|
|
if (Device.RuntimePlatform == Device.UWP) |
|
|
|
|
{ |
|
|
|
|
editor.BackgroundColor = Color.White; |
|
|
|
|
editor.TextColor = Color.Black; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
editor.BackgroundColor = Color.Black; |
|
|
|
|
editor.TextColor = Color.White; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Content = new StackLayout |
|
|
|
|
{ |
|
|
|
|
Children = |
|
|
|
|
{ |
|
|
|
|
changeBackgroundColorButton, |
|
|
|
|
label1, |
|
|
|
|
label2 |
|
|
|
|
label2, |
|
|
|
|
editor |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|