// Token: 0x06004700 RID: 18176 RVA: 0x0014205C File Offset: 0x0014025C
        private static void OnIsSelectedChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            DataGridCell dataGridCell = (DataGridCell)sender;
            bool         isSelected   = (bool)e.NewValue;

            if (!dataGridCell._syncingIsSelected)
            {
                DataGrid dataGridOwner = dataGridCell.DataGridOwner;
                if (dataGridOwner != null)
                {
                    dataGridOwner.CellIsSelectedChanged(dataGridCell, isSelected);
                }
            }
            dataGridCell.RaiseSelectionChangedEvent(isSelected);
            dataGridCell.UpdateVisualState();
        }
Пример #2
0
        private static void OnIsSelectedChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            DataGridCell cell       = (DataGridCell)sender;
            bool         isSelected = (bool)e.NewValue;

            // There is no reason to notify the DataGrid if IsSelected's value came
            // from the DataGrid.
            if (!cell._syncingIsSelected)
            {
                DataGrid dataGrid = cell.DataGridOwner;
                if (dataGrid != null)
                {
                    // Notify the DataGrid that a cell's IsSelected property changed
                    // in case it was done programmatically instead of by the
                    // DataGrid itself.
                    dataGrid.CellIsSelectedChanged(cell, isSelected);
                }
            }

            cell.RaiseSelectionChangedEvent(isSelected);
            cell.UpdateVisualState();
        }