//---------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation. All rights reserved.
//
//---------------------------------------------------------------------------
using System;
using System.Windows;
using System.Windows.Input;
namespace ExtendedGrid.Microsoft.Windows.Controls
{
///
/// Provides information just before a cell exits edit mode.
///
public class DataGridCellEditEndingEventArgs : EventArgs
{
///
/// Instantiates a new instance of this class.
///
/// The column of the cell that is about to exit edit mode.
/// The row container of the cell container that is about to exit edit mode.
/// The editing element within the cell.
/// The editing unit that is about to leave edit mode.
public DataGridCellEditEndingEventArgs(DataGridColumn column, DataGridRow row, FrameworkElement editingElement, DataGridEditAction editAction)
{
_dataGridColumn = column;
_dataGridRow = row;
_editingElement = editingElement;
_editAction = editAction;
}
///
/// When true, prevents the cell from exiting edit mode.
///
public bool Cancel
{
get { return _cancel; }
set { _cancel = value; }
}
///
/// The column of the cell that is about to exit edit mode.
///
public DataGridColumn Column
{
get { return _dataGridColumn; }
}
///
/// The row container of the cell container that is about to exit edit mode.
///
public DataGridRow Row
{
get { return _dataGridRow; }
}
///
/// The editing element within the cell.
///
public FrameworkElement EditingElement
{
get { return _editingElement; }
}
///
/// The edit action when leave edit mode.
///
public DataGridEditAction EditAction
{
get { return _editAction; }
}
private bool _cancel;
private DataGridColumn _dataGridColumn;
private DataGridRow _dataGridRow;
private FrameworkElement _editingElement;
private DataGridEditAction _editAction;
}
}