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 Exercise4_2
- {
- class MyContentPage : ContentPage
- {
- public MyContentPage ()
- {
- AbsoluteLayout absoluteLayout = new AbsoluteLayout
- {
- VerticalOptions = LayoutOptions.FillAndExpand
- };
- Label centeredLabel = new Label
- {
- Text = "Hello, World!"
- };
- absoluteLayout.Children.Add(centeredLabel);
- AbsoluteLayout.SetLayoutFlags(
- centeredLabel,
- AbsoluteLayoutFlags.PositionProportional);
- AbsoluteLayout.SetLayoutBounds(
- centeredLabel,
- new Rectangle(0.5, 0.5, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
- this.Content = absoluteLayout;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement