コード例 #1
0
ファイル: DataGridColumns.cs プロジェクト: dfr0/moon
        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
ファイル: DataGridColumns.cs プロジェクト: dfr0/moon
        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();
        }
コード例 #4
0
 public DataGridAutoGeneratingColumnEventArgs(PropertyInfo property, DataGridBoundColumnBase column) :
     base(column) 
 {
     this.Property = property;
 }