// Called after attaching ColumnVirtualizationManager to DataGridContext
 protected virtual void Initialize()
 {
     m_dataGridContext.PropertyChanged += new PropertyChangedEventHandler(this.DataGridContext_PropertyChanged);
     ItemsSourceChangeCompletedEventManager.AddListener(m_dataGridContext.DataGridControl, this);
     ViewChangedEventManager.AddListener(m_dataGridContext.DataGridControl, this);
     ThemeChangedEventManager.AddListener(m_dataGridContext.DataGridControl, this);
     VisibleColumnsUpdatedEventManager.AddListener(m_dataGridContext.Columns, this);
 }
 // Called after attaching ColumnVirtualizationManager to DataGridContext
 protected virtual void Initialize()
 {
     PropertyChangedEventManager.AddListener(m_dataGridContext, this, string.Empty);
     ItemsSourceChangeCompletedEventManager.AddListener(m_dataGridContext.DataGridControl, this);
     ViewChangedEventManager.AddListener(m_dataGridContext.DataGridControl, this);
     ThemeChangedEventManager.AddListener(m_dataGridContext.DataGridControl, this);
     ColumnsLayoutChangingEventManager.AddListener(m_dataGridContext.ColumnManager, this);
     ColumnsLayoutChangedEventManager.AddListener(m_dataGridContext.ColumnManager, this);
 }
        // Called before detaching ColumnVirtualizationManager from DataGridContext
        protected virtual void Uninitialize()
        {
            this.ResetInternalState();

            m_dataGridContext.PropertyChanged -= new PropertyChangedEventHandler(this.DataGridContext_PropertyChanged);
            ItemsSourceChangeCompletedEventManager.RemoveListener(m_dataGridContext.DataGridControl, this);
            ViewChangedEventManager.RemoveListener(m_dataGridContext.DataGridControl, this);
            ThemeChangedEventManager.RemoveListener(m_dataGridContext.DataGridControl, this);
            VisibleColumnsUpdatedEventManager.RemoveListener(m_dataGridContext.Columns, this);

            m_dataGridContext = null;
        }
        // Called before detaching ColumnVirtualizationManager from DataGridContext
        protected virtual void Uninitialize()
        {
            this.ResetInternalState();

            PropertyChangedEventManager.RemoveListener(m_dataGridContext, this, string.Empty);
            ItemsSourceChangeCompletedEventManager.RemoveListener(m_dataGridContext.DataGridControl, this);
            ViewChangedEventManager.RemoveListener(m_dataGridContext.DataGridControl, this);
            ThemeChangedEventManager.RemoveListener(m_dataGridContext.DataGridControl, this);
            ColumnsLayoutChangingEventManager.RemoveListener(m_dataGridContext.ColumnManager, this);
            ColumnsLayoutChangedEventManager.RemoveListener(m_dataGridContext.ColumnManager, this);

            m_dataGridContext = null;
        }