Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Xamarin.Forms;
- namespace ContentViewDemoVS
- {
- class MyContentPage : ContentPage
- {
- public MyContentPage()
- {
- ContentView contentView = new ContentView
- {
- BackgroundColor = Color.Accent,
- Padding = new Thickness(40),
- HorizontalOptions = LayoutOptions.Fill,
- Content = new Label
- {
- Text = "a view, a layout, or a layout of layouts",
- FontSize = 20,
- TextColor = Color.White
- }
- };
- this.Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 5);
- this.Content = new StackLayout
- {
- Children =
- {
- contentView
- }
- };
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement