Ejemplo n.º 1
0
        public TextCellVM CreateTextBox()
        {
            var textCell = new TextCellVM()
            {
                Content             = "123", Height = 50, Width = 80, CellRow = 0, CellColumn = 0,
                HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Center,
                NameColor           = System.Windows.Media.Colors.White.ToString()
            };

            Cells.Add(textCell);
            selectCell = textCell;
            return(textCell);
        }
Ejemplo n.º 2
0
 public void CreateTextOnRow()
 {
     if (Columns == 1)
     {
         while (oldRows < Rows)
         {
             var textCell = new TextCellVM()
             {
                 Content             = "123",
                 Height              = Cells[0].Height,
                 Width               = Cells[0].Width,
                 CellRow             = oldRows,
                 CellColumn          = Columns - 1,
                 HorizontalAlignment = HorizontalAlignment.Stretch,
                 VerticalAlignment   = VerticalAlignment.Center,
                 NameColor           = System.Windows.Media.Colors.White.ToString()
             };
             Height += Cells[0].Height;
             Cells.Add(textCell);
             selectCell = textCell;
             oldRows++;
         }
         return;
     }
     for (; oldRows < Rows; oldRows++)
     {
         Height += Cells[0].Height;
         for (var i = 0; i <= Columns - 1; i++)
         {
             var textCell = new TextCellVM()
             {
                 Content             = "123",
                 Height              = Cells[0].Height,
                 Width               = Cells[0].Width,
                 CellRow             = oldRows,
                 CellColumn          = i,
                 HorizontalAlignment = HorizontalAlignment.Stretch,
                 VerticalAlignment   = VerticalAlignment.Center,
                 NameColor           = System.Windows.Media.Colors.White.ToString()
             };
             Cells.Add(textCell);
             selectCell = textCell;
         }
     }
 }
Ejemplo n.º 3
0
 public void CreateTextOnColumn()
 {
     if (Rows == 1)
     {
         while (oldColumns < Columns)
         {
             var textCell = new TextCellVM()
             {
                 Content             = "123",
                 Height              = Cells[0].Height,
                 Width               = Cells[0].Width,
                 CellRow             = Rows - 1,
                 CellColumn          = oldColumns,
                 HorizontalAlignment = HorizontalAlignment.Stretch,
                 VerticalAlignment   = VerticalAlignment.Center,
                 NameColor           = System.Windows.Media.Colors.White.ToString()
             };
             Width += Cells[0].Width;
             Cells.Add(textCell);
             selectCell = textCell;
             oldColumns++;
         }
     }
     for (; oldColumns < Columns; oldColumns++)
     {
         Width += Cells[0].Width;
         for (var i = 0; i <= Rows - 1; i++)
         {
             var textCell = new TextCellVM()
             {
                 Content             = "123",
                 Height              = Cells[0].Height,
                 Width               = Cells[0].Width,
                 CellRow             = i,
                 CellColumn          = oldColumns,
                 HorizontalAlignment = HorizontalAlignment.Stretch,
                 VerticalAlignment   = VerticalAlignment.Center,
                 NameColor           = System.Windows.Media.Colors.White.ToString()
             };
             Cells.Add(textCell);
             selectCell = textCell;
         }
     }
 }