private void GenerateArrowSpaceForEndPoint(List <WorkflowLineDetail> lineEndPoints) { for (int i = 0; i < lineEndPoints.Count(); i++) { WorkflowLineDetail line = lineEndPoints[i]; WorkflowLineDirection direction = line.GetLineDirection(); Cell cell = GetIndexWorkFlowButtonCell(line.ToCell.RowIndex, line.ToCell.ColumnIndex); WorkflowColumnStyle columnStyle = null; WorkflowRowStyle rowStyle = null; switch (direction) { case WorkflowLineDirection.LEFT: // add space on right side of Button cell. columnStyle = new WorkflowColumnStyle(SizeType.Absolute, WorkflowColumnType.DisplayArrow); columnStyle.Width = ARROW_SPACE; ParentWorkflow.InsertColumn(cell.ColumnIndex + 1, columnStyle); break; case WorkflowLineDirection.TOP: // add space on bottom side of Button cell. rowStyle = new WorkflowRowStyle(SizeType.Absolute, WorkflowRowType.DisplayArrow); rowStyle.Height = ARROW_SPACE; ParentWorkflow.InsertRow(cell.RowIndex + 1, rowStyle); break; case WorkflowLineDirection.RIGHT: // add space on left side of Button cell. columnStyle = new WorkflowColumnStyle(SizeType.Absolute, WorkflowColumnType.DisplayArrow); columnStyle.Width = ARROW_SPACE; ParentWorkflow.InsertColumn(cell.ColumnIndex, columnStyle); break; case WorkflowLineDirection.BOTTOM: // add space on top side of Button cell. rowStyle = new WorkflowRowStyle(SizeType.Absolute, WorkflowRowType.DisplayArrow); rowStyle.Height = ARROW_SPACE; ParentWorkflow.InsertRow(cell.RowIndex, rowStyle); break; } } }