The community is working on translating this tutorial into Hindi, but it seems that no one has started the translation process for this article yet. If you can help us, then please click "More info".


The other dialogs

Windows Forms comes with a range of dialogs which we haven't talked about in this tutorial yet, for the simple reason that they don't exist in WPF. The most important one is definitely the FolderBrowserDialog, which lets the user select a folder within the file system, but other dialogs missing in WPF include the ColorDialog, theFontDialog, thePrintPreviewDialog and the PageSetupDialog.

This can be a real problem for WPF developers, since re-implementing these dialogs would be a huge task. Fortunately, WPF and WinForms can be mixed, simply by referencing the System.Windows.Forms assembly, but since WPF uses different base types for both colors and dialogs, this is not always a viable solution. It is however an easy solution if you just need the FolderBrowserDialog, since it only deals with folder paths as simple strings, but some purists would argue that mixing WPF and WinForms is never the way to go.

A better way to go, if you don't want to reinvent the wheel yourself, might be to use some of the work created by other developers. Here are a couple of links for article which offers a solution to some of the missing dialogs:

- A FontDialog alternative for WPF

- A ColorDialog alternative for WPF

In the end, you should choose the solution which fits the requirements of your application best.

This article has been fully translated into the following languages: Is your preferred language not on the list? Click here to help us translate this article into your language!