/// <summary>
        ///     Creates a structure that identifies the specific cell container.
        /// </summary>
        /// <param name="cell">
        ///     A reference to a cell.
        ///     This structure does not maintain a strong reference to the cell.
        ///     Changes to the cell will not affect this structure.
        /// </param>
        /// <remarks>
        ///     This constructor will tie the DataGridCellInfo to the specific
        ///     DataGrid that owns the cell container.
        /// </remarks>
        public DataGridCellInfo(DataGridCell cell)
        {
            if (cell == null)
            {
                throw new ArgumentNullException("cell");
            }

            _item = cell.RowDataItem;
            _column = cell.Column;
            _owner = new WeakReference(cell.DataGridOwner);
        }
Example #2
0
 /// <summary>
 ///     Creates the visual tree for boolean based cells.
 /// </summary>
 protected override FrameworkElement GenerateEditingElement(DataGridCell cell, object dataItem)
 {
     return(GenerateCheckBox(/* isEditing = */ true, cell));
 }
 protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem)
 {
     return null;
 }