public InsertCellAction(DragDropGrid grid, int columnIndex, int rowIndex, UIElement element) { this.grid = grid; this.columnIndex = columnIndex; this.rowIndex = rowIndex; this.element = element; }
public static void DeleteEmptyRowsAndColumns(ContentPanel contentPanel) { DragDropGrid grid = contentPanel.Parent as DragDropGrid; if (grid != null) { Actions.DeleteEmptyRowsAndColumns(grid); } }
public InsertColumnGridDropLocation(DragDropGrid panel, int column, int row, bool insertAtTheEnd, Rect insertionLineCoordinates) { this.panel = panel; if (insertAtTheEnd) { column++; } this.column = column; this.row = row; this.insertionLineCoordinates = insertionLineCoordinates; }
public static void DeleteContentPanelContents(ContentPanel contentPanel) { DragDropGrid grid = contentPanel.Parent as DragDropGrid; if (grid != null) { int columnIndex = Grid.GetColumn(contentPanel); int rowIndex = Grid.GetRow(contentPanel); Actions.RemoveCell(grid, columnIndex, rowIndex); return; } Actions.RemoveElementFromPanel(contentPanel, contentPanel.Children[0]); }
public virtual void Select(UIElement element) { SelectionManager.Select(element); DragDropGrid grid = this.Parent as DragDropGrid; if (grid == null) { return; } var proxy = new GridItemProxy(grid, this); Designer.Instance.GridPropertyGrid.Show(proxy, Designer.Instance.ActionManager); }
public new void Drop(IDragSource dragSource, UIElement draggedElement) { dragSource.CompleteDrag(); DragDropGrid grid = this.Parent as DragDropGrid; if (grid != null) { int column = Grid.GetColumn(this); int row = Grid.GetRow(this); Actions.AddNewCell(grid, column, row, draggedElement); } else { Actions.InsertChild(this, draggedElement); } dragSource.AfterDropComplete(); }
public static void AddNewCell(DragDropGrid grid, int columnIndex, int rowIndex, UIElement element) { var action = new InsertCellAction(grid, columnIndex, rowIndex, element); Record(action); }
public InsertColumnAction(DragDropGrid grid, int columnIndex) { this.grid = grid; this.columnIndex = columnIndex; this.columnDefinition = new ColumnDefinition(); }
public DeleteEmptyRowsAndColumnsAction(DragDropGrid grid) { this.grid = grid; }
public RemoveRowAction(DragDropGrid grid, int rowIndex) { this.grid = grid; this.rowIndex = rowIndex; this.rowDefinition = grid.RowDefinitions[rowIndex]; }
public InsertRowAction(DragDropGrid grid, int rowIndex) { this.grid = grid; this.rowIndex = rowIndex; this.rowDefinition = new RowDefinition(); }
public static void DeleteEmptyRowsAndColumns(DragDropGrid grid) { var action = new DeleteEmptyRowsAndColumnsAction(grid); Record(action); }
public GridItemProxy(DragDropGrid grid, FrameworkElement item) { this.grid = grid; this.item = item; }
public static void RemoveCell(DragDropGrid grid, int columnIndex, int rowIndex) { var action = new RemoveCellAction(grid, columnIndex, rowIndex); Record(action); }
public RemoveCellAction(DragDropGrid grid, int columnIndex, int rowIndex) { this.grid = grid; this.columnIndex = columnIndex; this.rowIndex = rowIndex; }
public static void RemoveRow(DragDropGrid grid, int rowIndex) { var action = new RemoveRowAction(grid, rowIndex); Record(action); }
public static void RemoveColumn(DragDropGrid grid, int columnIndex) { var action = new RemoveColumnAction(grid, columnIndex); Record(action); }
public RemoveColumnAction(DragDropGrid grid, int columnIndex) { this.grid = grid; this.columnIndex = columnIndex; this.columnDefinition = grid.ColumnDefinitions[columnIndex]; }