本文整理汇总了C#中System.Windows.Controls.DataGridRow.ApplyCellsState方法的典型用法代码示例。如果您正苦于以下问题:C# DataGridRow.ApplyCellsState方法的具体用法?C# DataGridRow.ApplyCellsState怎么用?C# DataGridRow.ApplyCellsState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.DataGridRow
的用法示例。
在下文中一共展示了DataGridRow.ApplyCellsState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadRowVisualsForDisplay
// Makes sure the row shows the proper visuals for selection, currency, details, etc.
private void LoadRowVisualsForDisplay(DataGridRow row)
{
// If the row has been recycled, reapply the BackgroundBrush
if (row.IsRecycled)
{
row.EnsureBackground();
row.ApplyCellsState(false /*animate*/);
}
else if (row == this.EditingRow)
{
//
row.ApplyCellsState(false /*animate*/);
}
// Set the Row's Style if we one's defined at the DataGrid level and the user didn't
// set one at the row level
EnsureElementStyle(row, null, this.RowStyle);
row.EnsureHeaderStyleAndVisibility(null);
// Check to see if the row contains the CurrentCell, apply its state.
if (this.CurrentColumnIndex != -1 &&
this.CurrentSlot != -1 &&
row.Index == this.CurrentSlot)
{
row.Cells[this.CurrentColumnIndex].ApplyCellState(false /*animate*/);
}
if (row.IsSelected || row.IsRecycled)
{
row.ApplyState(false);
}
// Show or hide RowDetails based on DataGrid settings
EnsureRowDetailsVisibility(row, false /*raiseNotification*/, false /*animate*/);
}