public void Handle(MahJongSolitaireMainGameClass message)
        {
            Visibility = Visibility.Visible;
            if (_command == null)
            {
                var  mod  = (MahJongSolitaireMainViewModel)DataContext; //hopefully that works.
                Type type = mod.GetType();

                MethodInfo?method = type.GetMethod(nameof(MahJongSolitaireMainViewModel.SelectTileAsync));
                if (method == null)
                {
                    throw new BasicBlankException("The select tile was not found.  Rethink");
                }
                MethodInfo?fun = type.GetMethod(nameof(MahJongSolitaireMainViewModel.CanSelectTile));
                if (fun == null)
                {
                    throw new BasicBlankException("The canselect tile was not found.  Rethink");
                }
                _command = new PlainCommand(mod, method, fun, mod.CommandContainer);
            }
            var  tempList = message.GameBoard1 !.GetPriorityBoards();
            bool isNew;

            if (_thisGrid.Children.Count > 1)
            {
                isNew = false;
            }
            else
            {
                isNew = true;
            }
            tempList.ForEach(thisBoard =>
            {
                thisBoard.TileList.ForEach(thisCard =>
                {
                    if (isNew == true)
                    {
                        MahJongSolitaireTilesWPF graphicsCard = new MahJongSolitaireTilesWPF();
                        graphicsCard.SendSize("", thisCard);
                        graphicsCard.Margin           = new Thickness(0, 0, 0, 0);
                        graphicsCard.Command          = _command; //try this way.  hopefully that works.
                        graphicsCard.CommandParameter = thisCard; // i think
                        //taking risks.
                        _thisGrid.Children.Add(graphicsCard);
                    }
                    else
                    {
                        var newItem              = GetControl(thisCard);
                        newItem !.DataContext    = null;
                        newItem.DataContext      = thisCard;
                        newItem.CommandParameter = thisCard; // i think
                    }
                });
            });
        }
 public GameBoardWPF(IEventAggregator aggregator)
 {
     //_thisMod = cons.Resolve<MahJongSolitaireViewModel>();
     aggregator.Subscribe(this);
     _thisGrid           = new Grid();
     Content             = _thisGrid;
     _newOne             = new MahJongSolitaireTilesWPF();
     _newOne.Visibility  = Visibility.Collapsed;
     _newOne.DataContext = null;
     _thisGrid.Children.Add(_newOne);
 }