NULLREFERENCEEXCEPTION IN WPF CODECOMPLETIONLISTBOX WHEN USED ON WINFORMS ELEMENTHOST

Hi,
just doing the first steps to integrate the WPF editor control in our app, and found a problem:
The CodeCompletionListBox constructor raises a NullReferenceException. This seems to happen because we have a WinForms app and place the WPF EditorControl on a "System.Windows.Forms.Integration.ElementHost".
The cause of the error seems to be the line
toolTip.PlacementTarget = Application.Current.MainWindow;
==>"Application.Current" is null in our environment.
I think it would be better to find the parent window of the current control.
One more to consider: what about an environment with multiple windows? In this case, "Application.Current.MainWindow" might pick the wrong parent as far as I understand it?
Workaround for me: use the WinForms editor control ;-).
I tried to modify your source code, but it seems I cannot use a self compiled "Alternet.Editor.Wpf.dll" - at least more steps are necessary - do I have to compile all Alternet DLLs myself?

Best regards
Wolfgang
Hi,
Thank you for the bug report.
We have made fix and will include it to the next update, which is expected shortly.
Just wonder why you prefer to use WPF editor hosted in WinForms application rather than using WinForms editor?
regards,
Andrew
Thanks! But as I use the WinForms control now (and will probably stay with it), the fix is not relevant for us ;-).
The reason to use a WPF control on an ElementHost: WinForms seems to be a bit obsolete, and one day we will have to migrate to WPF or something better. So, if we add a new UI component to our WinForms apps we try to use WPF if possible - this avoids a future migration to WPF.
Best regards
Wolfgang
Hi Wolfgang,
Thank you for the clarification, we've fixed the problem with the WPF editor hosted in WinForms app anyway, and the fix will be included in the upcoming update.
regards,
Andrew
Thanks!
Best regards
Wolfgang