Strange behavior of custom wpf windows

Hi all. Rhino 6 only while using it in windows 10( In windows 7 everything is ok).
I have a command that opens a wpf window with the following lines:

my_form my_form_stack= new my_form();
new System.Windows.Interop.WindowInteropHelper(my_form_stack).Owner = Rhino.RhinoApp.MainWindowHandle();

Everything is good if i don’t open grasshopper. If i open grasshopper, after closing it , i run my command to open “my_form_stack” and i can only see a whyte window.
You can see it in the following video
Thank you if someone knows what is happening.