Hello,
I got an issue with the XamMultiColumnComboEditor control since the the 14.2 service release 2178. This also apply to 15.1 service release 2008.
An invisible UserControl which host a XamMultiColumnComboEditor control raises a "System.NullReferenceException" and crash the application (both VS13 designer & BIN application):
à Infragistics.Controls.Editors.ComboEditorBase`2.XamWebComboEditor_Loaded(Object sender, RoutedEventArgs e) à System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs) à System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised) à System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args) à System.Windows.UIElement.RaiseEvent(RoutedEventArgs e) à System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent) à System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root) à MS.Internal.LoadedOrUnloadedOperation.DoWork() à System.Windows.Media.MediaContext.FireLoadedPendingCallbacks() à System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() à System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) à System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) à System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget) à System.Windows.Interop.HwndTarget.OnResize() à System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) à System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) à MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) à MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) à System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) à MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler) à System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) à MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
Steps to reproduce
1. Define a simple WPF user control "UserControl1" and add the XamMultiColumnComboEditor:
<UserControl 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" xmlns:Custom="http://infragistics.com/Windows" x:Class="WpfApplication1.UserControl1" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Grid> <ig:XamMultiColumnComboEditor/> Grid> UserControl>
2. In a window, or page, put that custom control "UserControl1" Inside the second tab - a tab which is not displayed by default
Note: standard WPF TabControl or Infragistics XamTabControl have the same behavior.
<Window xmlns:igWPF="http://schemas.infragistics.com/xaml/wpf" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:local="clr-namespace:WpfApplication1" x:Class="WpfApplication1.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <igWPF:XamTabControl> <igWPF:TabItemEx x:Name="tabItemEx1" Header="tabItemEx1"> <Grid/> igWPF:TabItemEx> <igWPF:TabItemEx x:Name="tabItemEx2" Header="tabItemEx2"> <local:UserControl1 /> igWPF:TabItemEx> igWPF:XamTabControl> Grid> Window>
- Close both documents and open again the window : VS13 designer crashes.
- Close both documents, compile and run : application crashes.
Notes:
- If we move the TabControl to the UserControl : KO, same behavior
- If we move UserControl1 to the first tab (the one which is displayed by default) : OK
Lib. reference: InfragisticsWPF4.Controls.Editors.XamComboEditor - 14.2.20142.2178 (was OK in 14.2.20142.2081)
code snippets
MainWindow:
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:ig="http://schemas.infragistics.com/xaml" xmlns:local="clr-namespace:WpfApplication1" x:Class="WpfApplication1.MainWindow" Title="MainWindow" Height="350" Width="525"> <Grid> <local:UserControl1 HorizontalAlignment="Left" Margin="139,142,0,0" VerticalAlignment="Top"/> Grid> Window>
UserControl1 snippet :
<UserControl 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" x:Class="WpfApplication1.UserControl1" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="300"> <Grid> <TabControl> <TabItem> <Grid> <CheckBox>DEFAULT ITEMCheckBox> Grid> TabItem> <TabItem> <ig:XamMultiColumnComboEditor /> TabItem> TabControl> Grid> UserControl>
Hi Everyone,
We've also hit this issue, so thanks for all the info & updates, it definitely saved us some time.
Infragistics, Any idea of a timescale for the fix please?
Also seeing this error in existing projects. Some update would be nice.
Version 14.2.20142.2224 was released on June 17th of last year and version 14.1.20141.2283 was released on April 8th of last year. Even though the build number is higher, the version is actually older as you are comparing two different volumes.
Your best option is to upgrade to 2014 Volume 2 or newer to get the fix.
The issue has been fixed in version 2224.
So in 2283 I should I have the fix.
It's really strange, I have the same control on an other window with no problem on it.
Binding and everuthing are the same.
The last service release for 2014 Volume 1 was released in April of 2015 and is version 14.1.20141.2283. As such if you need a fix for a control that has already been addressed you will need to upgrade to a later volume.
I have the same issue, but I'm on version 14.1.2283
But this issue appears only one control, the other control does not have the issue.
Regards
14.2 Service Release 2224 (released yesterday) appears to have fixed the issue.