public ColorControl()
 {
     InitializeComponent();
     LayoutRoot.DataContext = this;
     ColumnConfig           = new ColumnConfig();
     ColumnConfig.Columns   = new ObservableCollection <Column>();
 }
        public LiveBuildHelperVM(IDominoProvider pFParameters, int pBlockSize, Core.Orientation orientation, bool MirrorX, bool MirrorY)
        {
            blockSize     = pBlockSize;
            fParameters   = pFParameters;
            intField      = fParameters.GetBaseField(orientation, MirrorX, MirrorY);
            NextN         = 500;
            CountRow      = intField.GetLength(1);
            stonesPerLine = intField.GetLength(0);
            CountBlock    = Convert.ToInt32(Math.Ceiling(((double)stonesPerLine / blockSize)));
            SizeChanged   = new RelayCommand(o => { RefreshCanvas(); });
            MouseDown     = new RelayCommand(o => { currentBlock.Focus(); });
            ColumnConfig  = new ColumnConfig();

            var columns = new ObservableCollection <Column>();

            columns.Add(new Column()
            {
                DataField = "DominoColor.mediaColor", Header = ""
            });
            columns.Add(new Column()
            {
                DataField = "DominoColor.name", Header = "Name"
            });
            columns.Add(new Column()
            {
                DataField = "ProjectCount[0]", Header = "Total used"
            });
            columns.Add(new Column()
            {
                DataField = "ProjectCount[1]", Header = "Remaining"
            });
            columns.Add(new Column()
            {
                DataField = "ProjectCount[2]", Header = "Next " + NextN
            });

            ColumnConfig.Columns = columns;

            OpenPopup = new RelayCommand(x => { FillColorList(); PopupOpen = true; });
        }