entry, editor
This commit is contained in:
@@ -12,6 +12,11 @@
|
||||
<Label Text="This is Lable" TextColor="DarkSlateBlue" BackgroundColor="LightPink" FontSize="Large" FontAttributes="Bold" HorizontalTextAlignment="Start"/>
|
||||
<Label Text="This is Lable" TextColor="DarkSlateBlue" BackgroundColor="LightPink" FontSize="Large" FontAttributes="Italic" HorizontalTextAlignment="Center"/>
|
||||
<Label Text="This is 30 Lable" TextColor="Red" BackgroundColor="LightPink" FontSize="30" HorizontalTextAlignment="Center"/>
|
||||
|
||||
<Entry Placeholder="Input Text" TextColor="Salmon" FontSize="Large" FontAttributes="Bold" Keyboard="Text"/>
|
||||
<Entry Placeholder="Input Number" TextColor="Red" FontSize="Large" FontAttributes="Bold" Keyboard="Numeric"/>
|
||||
<Editor Placeholder="Input Message" TextColor="Red" BackgroundColor="{OnPlatform Android=Blue,UWP=White}" FontSize="Large" FontAttributes="Bold" HeightRequest="250"/>
|
||||
|
||||
</StackLayout>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
@@ -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
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user