错误CS0012类型“CellValuePresenter”在未引用的程序集中定义。您必须添加对程序集'InfragisticsWPF4.DataPresenter.v13.2,Version = 13.2.20132.1000,Culture = neutral,PublicKeyToken = 7dd5c3163f2cd0cb'
的引用
public void NavigateToView(TextEditorValidationRun validationRun)
{
var viewModel = DataContext as TextEditorViewModel;
if (viewModel == null)
{
return;
}
if(viewModel.SelectedLanguage.LanguageId !=validationRun.LanguageId)
{
viewModel.SelectedLanguage = viewModel.Languages.First(x => x.LanguageId == validationRun.LanguageId);
}
stringsDataGrid.ActiveDataItem = viewModel.TranslatableStrings.FirstOrDefault(x => x.TextId.Equals(validationRun.TextId));
if(stringsDataGrid.ActiveDataItem!=null)
{
string fieldName = stringsDataGrid.FieldLayouts[0].Fields[3].Name;
DataRecord dr = stringsDataGrid.Records.DataPresenter.GetRecordFromDataItem(stringsDataGrid.ActiveDataItem, false);
stringsDataGrid.ActiveCell = dr.Cells.Where(t => t.Field.Name == fieldName).FirstOrDefault();
if (stringsDataGrid.ActiveCell != null)
{
for (int i = 0; i < dr.Cells.Count; i++)
{
CellValuePresenter cellPresenter = CellValuePresenter.FromCell(dr.Cells[i]);
if (cellPresenter != null)
{
ErrorNavigationAnimation.HighlightErrorField(cellPresenter);
}
}
}
}
}