AppDemo4.MainPage.InflateAndAddToVtCcttorGood C# (CSharp) Method

InflateAndAddToVtCcttorGood() public method

public InflateAndAddToVtCcttorGood ( ) : void
return void
        void InflateAndAddToVtCcttorGood()
        {
            var grid = new Grid
            {
                RowDefinitions = new RowDefinitionCollection
                {
                    new RowDefinition { Height = GridLength.Auto },
                    new RowDefinition { Height = GridLength.Auto },
                    new RowDefinition { Height = GridLength.Auto },
                    new RowDefinition { Height = GridLength.Auto }
                }
            };

            var label1 = new Label
            {
                Text = "Hello Codemotion!"
            };
            var label2 = new Label
            {
                Text = "Hello Codemotion!"
            };
            var label3 = new Label
            {
                Text = "Hello Codemotion!"
            };
            var label4 = new Label
            {
                Text = "Hello Codemotion!"
            };
            grid.Children.Add(label1);
            grid.Children.Add(label2);
            grid.Children.Add(label3);
            grid.Children.Add(label4);

            Grid.SetRow(label1, 0);
            Grid.SetRow(label2, 1);
            Grid.SetRow(label3, 2);
            Grid.SetRow(label4, 3);

            Content = grid;
        }