Posted 27 March 2018, 11:18 pm EST
Hi,
The task of changing the row style is an expensive operation since FlexGrid needs to invalidate visual tree for every operation i.e., It takes time to take effect when we change some style of some element in visual tree.
To help you on this, we can only suggest to avoid not needed actions and make lag smaller. Please use the below code snippet for the same:```
private void flex_MouseMove(object sender, MouseEventArgs e)
{
C1.WPF.FlexGrid.HitTestInfo ht = this.flex.HitTest(e);
if (currentRow != ht.Row && (ht.CellType == C1.WPF.FlexGrid.CellType.Cell || ht.CellType == CellType.RowHeader))
{
// only apply changes if row index is different from previous one
if (currentRow != -1)
{
flex.Rows[currentRow].Background = null;
}
//Get Current Row Index
currentRow = ht.Row;
//Set Current Row BackColor
flex.Rows[currentRow].Background = mouseHover;
}
}