In one of my WPF projects, I have a UserControl as following:
<UserControl x:Class="Repository.UI.SetupModule.CalcRate.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:ig="http://schemas.infragistics.com/xaml" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300">
<Grid> <ig:XamComboEditor/> </Grid></UserControl>
I got the error on the XamComboEditor : Object reference not set to an instance of an object.
The StackTrace is:
at Infragistics.Controls.Editors.ComboEditorBase`2.OnApplyTemplate() at System.Windows.FrameworkElement.ApplyTemplate()
For testing purpose, I create a brand new WPF project, and add the same UserControl to the project, this time, there's no error on the XamCombeEditor.
I guess there must something in my project that causes the error, but unable to find out what it is.
please help, thanks.
Hi yingwu,
What is the version # on the Infragistics DLLs that you are using? I took a look in the latest source code available and inside ComboEditorBase.OnApplyTemplate(), every object being used has a null check around it so I can't see how you would be getting that exception. If I know what exact version you are using I can check that specific source code to see if there is anything different.
Hi Rob,
the version # for the InfragisticsWPF4.Controls.Editiors.XamComboEditor.v14.2.dll is 14.2.20142.1000.
Also, I have searched the whole solution for a style that might be targeting the ig:XamComboEditor, but found none. However, we do have a named style that targets the igWpf:XamComboEditor, not sure this has anything to do with the error.
Thank you very much for your help.