Skip to content

xamarin-samples/XamarinFormsHello

Repository files navigation

XamarinFormsHello

Xamarin.Forms Hello sample

Pickuped code

XamarinFormsHello/XamarinFormsHello/App.cs

public class App : Application
{
    public App()
    {
        // The root page of your application
        MainPage = new ContentPage
        {
            Content = new StackLayout
            {
                VerticalOptions = LayoutOptions.Center,
                Children = {
                    new Label {
                        HorizontalTextAlignment = TextAlignment.Center,
                        Text = "Hello Hello\nHello"
                    },
                    new Label {
                        HorizontalTextAlignment = TextAlignment.Start,
                        Text = "Xamarin\nWorld"
                    },
                    new Label {
                        HorizontalTextAlignment = TextAlignment.End,
                        Text = "with\nVisual Studio"
                    },
                }
            }
        };
    }
    ....

Screenshot

screenshot

About

Various label layout (left, center, right, multiline) by C# code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages