I have a problem that Corel steals the TextChanged or KeyDown events of a non-modal window.
They are stolen because in Corel the shortcuts for certain keys are active. As soon as the shortcuts for the respective key are deleted, the events work again.
The window is a wpf window which is open from a docker/addon via Show() method.
Do you have a solution for this?
Thanks a lot in advance.
You can call wpf following
MyWindow m_M = new MyWindow();WindowInteropHelper helper = new WindowInteropHelper(t);helper.Owner = GetFocus();m_M .Show();
Include pInvoke to get corelDraw handler;
[DllImport("user32.dll")]static extern IntPtr GetFocus();};
But if you wants a dialog add a new item in AppUi.xslt and call him by invokeItem<itemData guid="5730b856-94d3-49bd-9eff-ad1d625ba7f7"type="wpfhost"appearance="dialog"hostedType="Addons\AFolder\ADll.dll,MyNamespace.MyWindow"enable="true"/>
Remember to change window to usercontrol in this case
thank you very much for your answer. Awesome, now it works fine. With the WindowInteropHelper (first suggestion).
All events are fired absolutely clean now.
With best regards,David