Ejemplo n.º 1
0
 private void RowHandler(TabLayoutRow tabLayoutRow)
 {
     tabLayoutRow.Cell("!{{icon}}!").WithTitle("! !").WidthInPixels(20);
     tabLayoutRow.Cell("name").WithTitle("Name").AsKey().AlignRight().WidthInPixels(150);
     tabLayoutRow.Cell("count").WithTitle("Count").WidthInPixels(40);
     tabLayoutRow.Cell("goalEvents").WithTitle("Events").LimitTo(1);
 }
 private void DefaultRowHandler(TabLayoutRow tabLayoutRow)
 {
     tabLayoutRow.Cell("!{{icon}}!").WithTitle("! !").WidthInPixels(20);
     tabLayoutRow.Cell("key").WithTitle("Key").AsKey().AlignRight().WidthInPixels(100);
     tabLayoutRow.Cell("value").WithTitle("Value").WidthInPixels(250);
     tabLayoutRow.Cell("api").WithTitle("API").AsCode(CodeType.Csharp);
 }
Ejemplo n.º 3
0
        public void ConstructWithNoCells()
        {
            var row = new TabLayoutRow();

            var cells = row.Build() as IEnumerable <object>;

            Assert.Equal(0, cells.Count());
        }
 /// <summary>
 /// Rows the handler.
 /// </summary>
 /// <param name="tabLayoutRow">The tab layout row.</param>
 private void RowHandler(TabLayoutRow tabLayoutRow)
 {
     tabLayoutRow.Cell("!{{icon}}!").WithTitle("!&nbsp;!").WidthInPixels(20);
     tabLayoutRow.Cell("name").WithTitle("Rendering").AsKey();
     tabLayoutRow.Cell("placeholder").WithTitle("Placeholder");
     tabLayoutRow.Cell("dataSource").WithTitle("Data source").WidthInPixels(100);
     tabLayoutRow.Cell("details").WithTitle("Details").LimitTo(1);
 }
Ejemplo n.º 5
0
        public void AddTwoCells()
        {
            var row   = new TabLayoutRow();
            var cell1 = row.Cell(1);
            var cell2 = row.Cell(2);

            var cells = row.Build() as IEnumerable <object>;

            Assert.Equal(2, cells.Count());
            Assert.Equal(cell1, cells.First());
            Assert.Equal(cell2, cells.Last());
        }
Ejemplo n.º 6
0
        public void AddSingleCell()
        {
            const int expectedCellId = 1;
            var       row            = new TabLayoutRow();
            var       cell           = row.Cell(expectedCellId);

            var cells = row.Build() as IEnumerable <object>;

            Assert.Equal(1, cells.Count());
            Assert.Equal(cell, cells.First());
            Assert.Equal(cell.Data, expectedCellId);
        }
Ejemplo n.º 7
0
        public void ReturnObjectArrayOfColumnData()
        {
            var row = new TabLayoutRow();

            row.Cell(1);
            row.Cell(2);
            row.Cell(3);

            var cells = row.Build() as IEnumerable <object>;

            Assert.Equal(3, cells.Count());
            Assert.Equal(1, ((TabLayoutCell)cells.ElementAt(0)).Data);
            Assert.Equal(2, ((TabLayoutCell)cells.ElementAt(1)).Data);
            Assert.Equal(3, ((TabLayoutCell)cells.ElementAt(2)).Data);
        }