private bool CanReorderColumn(DataGridColumn column)
 {
     return OwningGrid.CanUserReorderColumns 
         && !(column is DataGridFillerColumn)
         && (column.CanUserReorderInternal.HasValue && column.CanUserReorderInternal.Value || !column.CanUserReorderInternal.HasValue);
 } 
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Avalonia.Controls.DataGridColumnReorderingEventArgs" /> class.
 /// </summary>
 /// <param name="dataGridColumn"></param>
 public DataGridColumnReorderingEventArgs(DataGridColumn dataGridColumn)
 {
     this.Column = dataGridColumn;
 }
Beispiel #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Avalonia.Controls.DataGridAutoGeneratingColumnEventArgs" /> class.
 /// </summary>
 /// <param name="propertyName">
 /// The name of the property bound to the generated column.
 /// </param>
 /// <param name="propertyType">
 /// The <see cref="T:System.Type" /> of the property bound to the generated column.
 /// </param>
 /// <param name="column">
 /// The generated column.
 /// </param>
 public DataGridAutoGeneratingColumnEventArgs(string propertyName, Type propertyType, DataGridColumn column)
 {
     Column       = column;
     PropertyName = propertyName;
     PropertyType = propertyType;
 }
Beispiel #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:Avalonia.Controls.DataGridColumnEventArgs" /> class.
 /// </summary>
 /// <param name="column">The column that the event occurs for.</param>
 public DataGridColumnEventArgs(DataGridColumn column)
 {
     Column = column ?? throw new ArgumentNullException(nameof(column));
 }
Beispiel #5
0
 /// <summary>
 /// Instantiates a new instance of this class.
 /// </summary>
 /// <param name="column">The column of the cell that has just exited edit mode.</param>
 /// <param name="row">The row container of the cell container that has just exited edit mode.</param>
 /// <param name="editAction">The editing action that has been taken.</param>
 public DataGridCellEditEndedEventArgs(DataGridColumn column, DataGridRow row, DataGridEditAction editAction)
 {
     Column     = column;
     Row        = row;
     EditAction = editAction;
 }