• 0

[C#] CommonFileDialogs


Question

Hi

I've a problem. I have a project written in C# with a WPF GUI. Now I started integrating the Vista/7 Dialogs using WindowsApiCodePack. A component I use regularly is the CommonFileOpenDialog.

My problem has a main Window, which opens when you start the exe. Then you can click a button and another Window opens. The mainwindow stays open. In the second window there's a button to open the file dialog.

The Problem:

The FileDialog opens like it was opened by the mainwindow. The window, that opens the filedialog should be disabled while the dialog is opened. If i open the dialog, it disables the mainwindow instead of the second window.

Anybody an idea?

I hope, it's my problem's clear.

Thank you

Patrik

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi,

I would suggest you use their latest release (1.0 release went live yesterday - http://code.msdn.microsoft.com/WindowsAPICodePack). It looks like the CommonFileDialog.cs is using the main application window as the owner of the dialog.

I would suggest opening up a issue with them (on the above site) and requesting a feature for adding the owner property. The common file dialog (native API) takes a owner handle and if it's made public, you can probably pass that 2nd window's handle to the dialog and make it modal.

The new release also includes tons of new features, so try it out.

- Keeron

Hi

I've a problem. I have a project written in C# with a WPF GUI. Now I started integrating the Vista/7 Dialogs using WindowsApiCodePack. A component I use regularly is the CommonFileOpenDialog.

My problem has a main Window, which opens when you start the exe. Then you can click a button and another Window opens. The mainwindow stays open. In the second window there's a button to open the file dialog.

The Problem:

The FileDialog opens like it was opened by the mainwindow. The window, that opens the filedialog should be disabled while the dialog is opened. If i open the dialog, it disables the mainwindow instead of the second window.

Anybody an idea?

I hope, it's my problem's clear.

Thank you

Patrik

Link to comment
Share on other sites

  • 0

Hey

thanks for the quick answer.

I'm already using version one. Noticed the changes too, had to change some parts of my code ;)

I've posted it on the issue list. Hope they'll fix the problem soon...

Thanks

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.