I am receiving an error message \"Recursive call to Automation Peer API is not valid\" when loading a datagrid with a datatemplatecolumn containing a combobox column. The er
I was able to fix this issue by replacing both the DataGrid and the ComboBox in the WPF XAML file with the following two derived classes which both override the OnCreateAutomationPeer() method.
public class SafeDataGrid : DataGrid
{
protected override AutomationPeer OnCreateAutomationPeer()
{
return null;
}
}
public class SafeComboBox : ComboBox
{
protected override AutomationPeer OnCreateAutomationPeer()
{
return null;
}
}