Accordion.Forms.MainPage.CreateCell C# (CSharp) Method

CreateCell() static private method

static private CreateCell ( ) : Grid
return Xamarin.Forms.Grid
        static Grid CreateCell()
        {
            var blackBox = new BoxView()
            {
                BackgroundColor = Color.Black,
                HeightRequest = 100,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
            };

            var greenBox = new BoxView()
            {
                BackgroundColor = Color.FromHex("607624"),
                HeightRequest = 98,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.Center
            };

            var label = new Label()
            {
                Text = "You can touch here.",
                TextColor = Color.White,
                VerticalTextAlignment = TextAlignment.Center,
                HorizontalTextAlignment = TextAlignment.Center,
                VerticalOptions = LayoutOptions.Center,
                HorizontalOptions = LayoutOptions.Center
            };

            var cell = new Grid()
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,

                Padding = new Thickness(0, 0, 0, 0),
                RowSpacing = 0,
                ColumnSpacing = 0,
            };

            cell.Children.Add(blackBox);
            cell.Children.Add(greenBox);
            cell.Children.Add(label);
            return cell;
        }
    }