Home Dashboard Directory Help
Search

ShowDialog from WinForm to Window WPF by pileggi


Status: 

Closed
 as Not Reproducible Help for as Not Reproducible


0
0
Sign in
to vote
Type: Bug
ID: 434904
Opened: 4/24/2009 12:18:20 AM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Hi!
If I try to open a dialog-window WPF from a WinForm:
Dim f As New MyWinWPF()
f.ShowDialog
but if I don't set the 'Owner' property of the window (f.Owner = Me) and I change the active status of the applications while the WPF-dialog-window is open, the window disappear and I have to type ALT+TAB to find it again, or else I have to access to the task-manager.
But the 'Owner' property can't be setted by a WinForm, it accept only a System.Windows.Window. There is a solution or I have to accept the problem passively?
Thank you!
Pileggi
PS The property 'ShowInTaskBar' don't help me: if I set it to 'True' the WPF-dialog-window become free from the 'father-form' and I can select it indipendently from the father-form (and vice versa) width side effects.
Details
Sign in to post a comment.
Posted by Microsoft on 5/25/2009 at 9:50 PM
Thanks for reporting the issue.

In order to root cause / fix the issue, we must first reproduce it in our labs. We are unable to reproduce the issue with the steps you provided.

It may help if you provide us with a zipped project file.

If we do not receive a response from you after 7 days, we will automatically close the issue. There is no obligation to respond -- at any time you may edit your issue via Connect and change the status to “Active.”

Thanks,
UIFx Team
Posted by Microsoft on 5/6/2009 at 3:18 AM
Thanks for your response. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.

Thank you,
Visual Studio Product Team
Posted by pileggi on 4/27/2009 at 4:17 AM
To change the active status of the Winows you have to "clik on another opened application on the windows-status-bar, while the WPF-dialog-window is open" (sorry, I should had writed it in the body of my post).
Now, I have found the solution:

(with wpf as the istance of the dialog window wpf)
Dim interop as new WindowInteropHelper(wpf)
interop.Owner = me.Handle
wpf.ShowDialog()

Thank you!
Pileggi
Posted by pileggi on 4/27/2009 at 4:15 AM
I have seen now your comment. To change the active status of the Winows you have to "clik on another opened application on the windows-status-bar, while the WPF-dialog-window is open" (sorry, I should had writed it in the body of my post).
Now, as you can see in my previous comment, I have found the solution.
Thank you!
Pileggi
Posted by pileggi on 4/27/2009 at 4:04 AM
ok, this is the solution:
(with wpf as the istance of the dialog window wpf)
Dim interop as new WindowInteropHelper(wpf)
interop.Owner = me.Handle
wpf.ShowDialog()

Pileggi
Posted by Microsoft on 4/27/2009 at 4:00 AM
Thanks for reporting the issue.
In order to fix the issue, we must first reproduce the issue in our labs. We are unable to reproduce the issue with the steps you provided. We tried to repro with the following steps:
1. Create a new C# winform application (say A).
2. Add a new WPF project to the solution (say B).
3. Add project reference from A to B.
4. Drag and drop a button to A and then type the following code in the event handler of button click:
WpfApplication1.WPFWindow f = new WpfApplication1.WPFWindow();
            f.ShowDialog();
5. F5 to run the solution
here we don't know how to "change the active status of the applications ", maximize or Minimize or Hide the winform?

It may help if you provide us with:
1. a demo project used to reproduce this issue.
2. more snapshots.


Thank you,
Visual Studio Product Team
Sign in to post a workaround.