S
Stefanie Mehl
Hi,
It is a well known fact that if you use the Microsoft.Win32.OpenFileDialog
from an WPF application you will have old fashioned buttons and icons. The
proposed solution to this problem (at least for ClickOnce applications) is to
put a certain paragraph into the .exe.manifest file
(http://bombayboy.wordpress.com/2006/09/09/wpf-avalon-clickonce-application-and-fileopendialog-2/):
<dependency>
<dependentAssembly>
<assemblyIdentity
type=â€win32″
name=â€Microsoft.Windows.Common-Controlsâ€
version=â€6.0.0.0″
processorArchitecture=â€X86″
publicKeyToken=â€6595b64144ccf1dfâ€
language=â€*â€
/>
</dependentAssembly>
</dependency>
Other options proposed are: Try to use EnableVisualStyles where people
assume that this is not stable (SEHExceptions problems?). Or implement the
dialog yourself by using a "Vista Bridge" sample from the Windows SDK, which
probably works only on Vista systems.
(http://reader.feedshow.com/show_items-feed=d7f39942385afee366f96021e8eb6263?page=1).
Howerver, the majority votes for the manifest solution, but there seems to
be a serious drawback: On Windows XP 64 bit versions, there is no version of
Common Controls that matches this entry in the manifest file. There are wow64
and amd64 versions of CommonControls 6.0.x available but for applications
compiled for 32 bit none of them can be used. For 32 bit applications, only
version 5.8.x is available which makes it very risky to use the above
mentioned entry in the manifest file because the ClickOnce application will
crash at install time.
Is there really no better solution to display decent OpenFileDialogs in WPF?
Best regards,
Stefanie
It is a well known fact that if you use the Microsoft.Win32.OpenFileDialog
from an WPF application you will have old fashioned buttons and icons. The
proposed solution to this problem (at least for ClickOnce applications) is to
put a certain paragraph into the .exe.manifest file
(http://bombayboy.wordpress.com/2006/09/09/wpf-avalon-clickonce-application-and-fileopendialog-2/):
<dependency>
<dependentAssembly>
<assemblyIdentity
type=â€win32″
name=â€Microsoft.Windows.Common-Controlsâ€
version=â€6.0.0.0″
processorArchitecture=â€X86″
publicKeyToken=â€6595b64144ccf1dfâ€
language=â€*â€
/>
</dependentAssembly>
</dependency>
Other options proposed are: Try to use EnableVisualStyles where people
assume that this is not stable (SEHExceptions problems?). Or implement the
dialog yourself by using a "Vista Bridge" sample from the Windows SDK, which
probably works only on Vista systems.
(http://reader.feedshow.com/show_items-feed=d7f39942385afee366f96021e8eb6263?page=1).
Howerver, the majority votes for the manifest solution, but there seems to
be a serious drawback: On Windows XP 64 bit versions, there is no version of
Common Controls that matches this entry in the manifest file. There are wow64
and amd64 versions of CommonControls 6.0.x available but for applications
compiled for 32 bit none of them can be used. For 32 bit applications, only
version 5.8.x is available which makes it very risky to use the above
mentioned entry in the manifest file because the ClickOnce application will
crash at install time.
Is there really no better solution to display decent OpenFileDialogs in WPF?
Best regards,
Stefanie