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>
Yes it's the same issue. Do you know when the fix will be available ?
Thanks,
Hello Oliver,
Thank you for your post.
I have been looking into it. It seems that the behavior that you have describe was discussed at the following forum thread: http://ko.infragistics.com/community/forums/p/95977/474135.aspx#474135.
Hi,
Service release 2013 on version 15.1 is not available for WPF, only for WinForms. Same issue with SR 2183 for 14.2.
Please find a screenshots of my current Downloads page below:
Thanks for your answer :)
hi,
you must to install:- Service release 2183 on version 14.2- Service release 2013 on version 15.1
I get the same issue.. Since the latest 14.2 update I get a runtime error on my project. I tried to use the 15.1 version unsucessfully (same error).
"An unhandled exception of type 'System.NullReferenceException' occurred in InfragisticsWPF4.Controls.Editors.XamComboEditor.v15.1.dll"
Note: In my case I just have to add an XamComboEditor component (without any options) to get the exception.
Do you have any idea to fix it ?
Thanks for you help.