示例#1
0
        /// <summary>
        /// Updates the style for the particular column.
        /// Implement this method to update style when the cell UIElement is reused during scrolling.
        /// </summary>
        /// <param name="treeDataColumn">
        /// Specifies the corresponding column to update style.
        /// </param>
        protected override void OnUpdateStyleInfo(TreeDataColumn treeDataColumn)
        {
            RowColumnIndex   cellRowColumnIndex = new RowColumnIndex(treeDataColumn.RowIndex, treeDataColumn.ColumnIndex);
            FrameworkElement uiElement          = treeDataColumn.ColumnElement;
            TreeGridColumn   column             = treeDataColumn.TreeGridColumn;

            if (uiElement.Visibility == Visibility.Collapsed)
            {
                return;
            }
            var record = (uiElement as FrameworkElement) != null ? (uiElement as FrameworkElement).DataContext : null;

            if (record == null && treeDataColumn.DataRow != null)
            {
                record = treeDataColumn.DataRow.RowData;
            }
            this.InitializeCellStyle(treeDataColumn, record);
        }
 protected virtual void OnUpdateStyleInfo(TreeDataColumn treeDataColumn)
 {
 }
 /// <summary>
 /// Updates the cell style of the particular column.
 /// Implement this method to update style when the cell UIElement is reused during scrolling.
 /// </summary>
 /// <param name="treeDataColumn">
 /// Specifies the corresponding column to update style.
 /// </param>
 public void UpdateCellStyle(TreeDataColumn treeDataColumn)
 {
     OnUpdateStyleInfo(treeDataColumn);
 }