示例#1
0
 public TabLayout Row(Action<TabLayoutRow> row)
 {
     var layoutRow = new TabLayoutRow();
     row.Invoke(layoutRow);
     rows.Add(layoutRow);
     return this;
 }
示例#2
0
        public TabLayout Row(Action <TabLayoutRow> row)
        {
            var layoutRow = new TabLayoutRow();

            row.Invoke(layoutRow);
            rows.Add(layoutRow);
            return(this);
        }
示例#3
0
		public void ConstructWithNoCells()
		{
			var row = new TabLayoutRow();

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

			Assert.Equal(0, cells.Count());
		}
示例#4
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());
		}
示例#5
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);
		}
示例#6
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);
		}