Пример #1
0
        internal void OnColumnElementStyleChanged(DataGridBoundColumnBase column) 
        {
            // Update Element Style in Displayed rows 
            for (int childIndex = 0; childIndex < this.DisplayedAndEditedRowCount; childIndex++)
            {
                DataGridRow row = _cells.Children[childIndex] as DataGridRow; 
                if (row != null)
                {
                    FrameworkElement element = column.GetElement(row); 
                    // 
                    if (element != null && element.Style == null)
                    { 
                        element.Style = column.ElementStyle;
                    }
                } 
            }
            // Set Element Style for prefetched rows if HeaderCell.Style is not already set
            foreach (DataGridRow row in _prefetchedRows) 
            { 
                FrameworkElement element = column.GetElement(row);
                // 
                if (element != null && element.Style == null)
                {
                    element.Style = column.ElementStyle; 
                }
            }
 
            // Simply discard the Recyclable rows.  This operation happens less enough that discarding 
            // the Recyclable rows here shoudln't be too bad
            _recyclableRows.Clear(); 
        }
Пример #2
0
 public DataGridAutoGeneratingColumnEventArgs(PropertyInfo property, DataGridBoundColumnBase column) :
     base(column)
 {
     this.Property = property;
 }
Пример #3
0
        internal void OnColumnDisplayMemberBindingChanged(DataGridBoundColumnBase column) 
        {
            // Update Binding in Displayed rows by regenerating the affected elements 
            for (int childIndex = 0; childIndex < this.DisplayedAndEditedRowCount; childIndex++)
            {
                DataGridRow row = _cells.Children[childIndex] as DataGridRow; 
                if (row != null)
                {
                    PopulateCellContent(true /* forceTemplating */, false, column, row, row.Cells[column.Index]); 
                } 
            }
 
            // Simply discard the Prefetched and Recyclable rows.  This operation happens less enough that discarding
            // the Recyclable rows here shoudln't be too bad
            _prefetchedRows.Clear(); 
            _recyclableRows.Clear();
        }
 public DataGridAutoGeneratingColumnEventArgs(PropertyInfo property, DataGridBoundColumnBase column) :
     base(column) 
 {
     this.Property = property;
 }