Exemple #1
0
        protected internal override void PrepareContainer(DataGridContext dataGridContext, object item)
        {
            base.PrepareContainer(dataGridContext, item);

            if (dataGridContext.SelectedCellsStore.Contains(DataGridVirtualizingPanel.GetItemIndex(this.ParentRow), this.ParentColumn.VisiblePosition))
            {
                this.SetIsSelected(true);
            }
        }
        private static void OnParentDataGridControlChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
        {
            DataGridVirtualizingPanel panel = ( DataGridVirtualizingPanel )sender;

            if ((panel != null) && (e.NewValue == null) && (panel.m_customGenerator != null))
            {
                panel.m_customGenerator.ItemsChanged -= panel.OnCustomGeneratorItemsChanged;
                panel.m_customGenerator            = null;
                panel.m_initializedCustomGenerator = false;
            }
        }