private void PopulateControls(RackoGameContainer gameContainer)
        {
            _thisStack !.Children.Clear();
            int starts   = gameContainer.PlayerList.Count() + 2;
            int diffs    = starts;
            var tempList = _cardList !.ToRegularDeckDict();

            tempList.Reverse();
            int x;
            CustomBasicList <int> otherList = new CustomBasicList <int>();

            for (x = 1; x <= 10; x++)
            {
                otherList.Add(starts);
                starts += diffs;
            }
            otherList.Reverse();
            foreach (var thisCard in tempList)
            {
                Grid thisGrid = new Grid();
                thisGrid.DataContext = thisCard; // i think
                GridHelper.AddPixelColumn(thisGrid, 100);
                GridHelper.AddAutoColumns(thisGrid, 1);
                var thisLabel = SharedUIFunctions.GetDefaultLabel();
                thisLabel.HorizontalAlignment = HorizontalAlignment.Center;
                thisLabel.VerticalAlignment   = VerticalAlignment.Center;
                thisLabel.Text     = otherList[tempList.IndexOf(thisCard)].ToString();
                thisLabel.FontSize = 40;
                thisLabel.Margin   = new Thickness(0, 3, 0, 0);
                GridHelper.AddControlToGrid(thisGrid, thisLabel, 0, 0);
                CardGraphicsWPF graphics = new CardGraphicsWPF();
                graphics.SendSize("", thisCard); //hopefully this simple.
                GridHelper.AddControlToGrid(thisGrid, graphics, 0, 1);
                RowClickerWPF custom = new RowClickerWPF();
                custom.Command          = _thisCommand !;
                custom.CommandParameter = thisCard;
                //custom.Name = nameof(RackoMainViewModel.PlayOnPileAsync);
                //custom.Command = mainGame.ThisMod!.PlayOnPileCommand;
                GridHelper.AddControlToGrid(thisGrid, custom, 0, 0);
                Grid.SetColumnSpan(custom, 2); // so it spans the entire control.
                _thisStack.Children.Add(thisGrid);
            }
        }
        //something else has to do messagebox.
        public YahtzeeScoresheetView(ScoreContainer scoreContainer)
        {
            Grid grid = new Grid();

            GridHelper.AddAutoColumns(grid, 2);
            // there are 2 groupboxes
            CrossPlatformBorderWPF thisBorder;
            GroupBox thisGroup = new GroupBox();

            thisGroup.VerticalAlignment = VerticalAlignment.Top;
            GridHelper.AddControlToGrid(grid, thisGroup, 0, 0);
            thisGroup.Header          = "Top Portion";
            thisGroup.BorderThickness = new Thickness(2, 2, 2, 2);
            thisGroup.Foreground      = Brushes.White;
            thisGroup.BorderBrush     = Brushes.Black;
            Grid otherGrid = new Grid();

            thisGroup.Content    = otherGrid;
            otherGrid.Background = Brushes.White;
            otherGrid.Margin     = new Thickness(4, 4, 4, 4);
            GridHelper.AddAutoColumns(otherGrid, 1);
            GridHelper.AddPixelColumn(otherGrid, 75);
            GridHelper.AddPixelColumn(otherGrid, 75);
            GridHelper.AddAutoRows(otherGrid, 9);
            var thisLabel = GetHeaderLabel("Description");

            GridHelper.AddControlToGrid(otherGrid, thisLabel, 0, 0);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, 0, 0);
            thisLabel = GetHeaderLabel("Possible Points");
            GridHelper.AddControlToGrid(otherGrid, thisLabel, 0, 1);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, 0, 1);
            thisLabel = GetHeaderLabel("Points Obtained");
            GridHelper.AddControlToGrid(otherGrid, thisLabel, 0, 2);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, 0, 2);
            var thisList = (from Items in scoreContainer.RowList
                            where Items.IsTop == true && Items.RowSection == EnumRow.Regular
                            select Items).ToCustomBasicList();

            if (thisList.Count != 6)
            {
                throw new BasicBlankException("All yahtzee games must have 6 sections total, not " + thisList.Count);
            }
            int x = 0;

            foreach (var thisRow in thisList)
            {
                x += 1;
                AddBackroundLabel(otherGrid, thisRow, x);
                thisLabel  = GetDescriptionText(thisRow.Description);
                thisBorder = GetBorder();
                GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 0);
                GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 0);
                thisLabel = GetPossibleText(thisRow);
                GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 1);
                thisBorder = GetBorder();
                GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 1);
                thisLabel = GetScoreText(thisRow);
                GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 2);
                thisBorder = GetBorder();
                GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 2);
                RowClickerWPF temprow = new RowClickerWPF();
                GridHelper.AddControlToGrid(otherGrid, temprow, x, 0);
                temprow.DataContext      = thisRow; //i think.
                temprow.Name             = nameof(IScoresheetAction.RowAsync);
                temprow.CommandParameter = thisRow;
                GamePackageViewModelBinder.ManuelElements.Add(temprow);
                Grid.SetColumnSpan(temprow, 3);
            }
            RowInfo bonus = (from y in scoreContainer.RowList
                             where y.IsTop == true && y.RowSection == EnumRow.Bonus
                             select y).Single();

            x        += 1;
            thisLabel = GetDescriptionText(bonus.Description);
            GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 0);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 0);
            thisLabel            = new TextBlock();
            thisLabel.Background = Brushes.Aqua;
            GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 1);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 1);
            thisLabel = GetScoreText(bonus);
            GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 2);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 2);
            x        += 1; //total score last
            thisLabel = GetFooterText("Total Top Portion");
            GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 0);
            Grid.SetColumnSpan(thisLabel, 2);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 0);
            Grid.SetColumnSpan(thisBorder, 2);
            RowInfo topTotal = (from Items in scoreContainer.RowList
                                where Items.IsTop == true && Items.RowSection == EnumRow.Totals
                                select Items).Single();

            thisLabel = GetScoreText(topTotal);
            GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 2);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 2);
            thisGroup = new GroupBox();
            GridHelper.AddControlToGrid(grid, thisGroup, 0, 1);
            thisGroup.Header          = "Bottom Portion";
            thisGroup.BorderThickness = new Thickness(2, 2, 2, 2);
            thisGroup.Foreground      = Brushes.White;
            thisGroup.BorderBrush     = Brushes.Black;
            otherGrid            = new Grid();
            thisGroup.Content    = otherGrid;
            otherGrid.Background = Brushes.White;
            otherGrid.Margin     = new Thickness(4, 4, 4, 4);
            GridHelper.AddAutoColumns(otherGrid, 1);
            GridHelper.AddPixelColumn(otherGrid, 75);
            GridHelper.AddPixelColumn(otherGrid, 75);
            thisList = (from Items in scoreContainer.RowList
                        where Items.IsTop == false && Items.RowSection == EnumRow.Regular
                        select Items).ToCustomBasicList();
            GridHelper.AddAutoRows(otherGrid, thisList.Count + 2); // because needs header and footer
            thisLabel = GetHeaderLabel("Description");
            GridHelper.AddControlToGrid(otherGrid, thisLabel, 0, 0);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, 0, 0);
            thisLabel = GetHeaderLabel("Possible Points");
            GridHelper.AddControlToGrid(otherGrid, thisLabel, 0, 1);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, 0, 1);
            thisLabel = GetHeaderLabel("Points Obtained");
            GridHelper.AddControlToGrid(otherGrid, thisLabel, 0, 2);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, 0, 2);
            x = 0;
            foreach (var thisRow in thisList)
            {
                RowClickerWPF tempRow = new RowClickerWPF();
                x += 1;
                AddBackroundLabel(otherGrid, thisRow, x);
                thisLabel  = GetDescriptionText(thisRow.Description);
                thisBorder = GetBorder();
                GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 0);
                GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 0);
                thisLabel = GetPossibleText(thisRow);
                GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 1);
                thisBorder = GetBorder();
                GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 1);
                thisLabel = GetScoreText(thisRow);
                GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 2);
                thisBorder = GetBorder();
                GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 2);
                GridHelper.AddControlToGrid(otherGrid, tempRow, x, 0);
                tempRow.Name             = nameof(IScoresheetAction.RowAsync);
                tempRow.DataContext      = thisRow;
                tempRow.CommandParameter = thisRow;
                GamePackageViewModelBinder.ManuelElements.Add(tempRow);
                Grid.SetColumnSpan(tempRow, 3);
            }
            RowInfo bottomTotal = (from y in scoreContainer.RowList
                                   where y.IsTop == false && y.RowSection == EnumRow.Totals
                                   select y).Single();

            x        += 1;
            thisLabel = GetFooterText("Total Bottom Portion");
            GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 0);
            Grid.SetColumnSpan(thisLabel, 2);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 0);
            Grid.SetColumnSpan(thisBorder, 2);
            // Dim TopTotal = (From Items In ThisMod.RowList Where Items.IsTop = True AndAlso Items.RowSection = RowInfo.EnumRowEnum.Totals).Single
            thisLabel = GetScoreText(bottomTotal);
            GridHelper.AddControlToGrid(otherGrid, thisLabel, x, 2);
            thisBorder = GetBorder();
            GridHelper.AddControlToGrid(otherGrid, thisBorder, x, 2);
            Content = grid;
        }