Пример #1
0
			public Rows(ResizableGrid owner)
				: base(owner) {
				RowList = new List<Row>();
				for(int i = 0; i < Owner.BandBehavior.RowDefinitions.Count; i++)
					RowList.Add(new Row(Owner, i));
			}
Пример #2
0
			public Row(ResizableGrid owner, int rowIndex)
				: base(owner) {
				RowCellList = new List<RowCell>();
				foreach(ContentControl item in Owner.Children) {
					ColumnBase gridColumn = item.DataContext as ColumnBase;
					int row = BandedViewBehavior.GetRow(gridColumn);
					int rowSpan = BandedViewBehavior.GetRowSpan(gridColumn);
					if(row <= rowIndex && row + rowSpan > rowIndex)
						RowCellList.Add(new RowCell(Owner, gridColumn, item));
					Comparison<RowCell> sortingMethos = (rowCell1, rowCell2) => {
						if(rowCell1.Column == rowCell2.Column) return 0;
						return rowCell1.Column < rowCell2.Column ? -1 : 1;
					};
					RowCellList.Sort(sortingMethos);
				}
			}
Пример #3
0
			public HelperBase(ResizableGrid owner) {
				Owner = owner;
			}
Пример #4
-1
			public RowCell(ResizableGrid owner, ColumnBase gridColumn, ContentControl contentControl)
				: base(owner) {
				GridColumnControl = contentControl;
				GridColumn = gridColumn;
				Row = BandedViewBehavior.GetRow(GridColumn);
				RowSpan = BandedViewBehavior.GetRowSpan(GridColumn);
				Column = BandedViewBehavior.GetColumn(GridColumn);
				ColumnSpan = BandedViewBehavior.GetColumnSpan(GridColumn);
				ColumnDefinitions = new ColumnDefinitions();
				for(int i = Column; i < Column + ColumnSpan; i++)
					ColumnDefinitions.Add(Owner.BandBehavior.ColumnDefinitions[i]);
			}