Wpf – How to deal with look-and-feel differences between standard dialogs and WPF

dialogwpf

please help resolving one look-and-feel inconsistency issue in WPF.

Look at the picture from MSDN Magazine article on Advanced WPF:

Different button appearance

MessageBox.Show(message) is called, and why the button on it looks different than buttons on the main window?

The Open File standard WPF dialog has the same problem, only worse: on Vista it looks like old XP (if not win2k) dialog, when all other apps use new cool Vista dialogs.

So,

  • What explains such strange behavior of PresentationFramework?
  • How can I make my app use default system dialogs, with system styles, that don't look like win2k?

Best Answer

I am not an expert, but my opinion is that WPF draws all its controls in a scene graph and can apply styles to the controls. The default system dialogs are drawn with GDI and must be styled by GDI. In that screen shot, the system dialog didn't have any WPF looking style attached to it.