tags:

views:

791

answers:

5

Just found this out the hard way. I wanted to pop up a FontDialog to allow the user to choose a font.. one of those familiar dialogs..

+5  A: 

Not all of them have equivalents.
The FontDialog for instance doesnt.. (grumble grumble). This page has the complete lowdown.. posting since it may be useful just as a mental note. http://msdn.microsoft.com/en-us/library/ms750559.aspx

Update: The Programming WPF book had this covered. Apparently some of the dialogs didn't make the RTM bus. The FontDialog that will included into the next update is available here.. as is the ColorPicker dialog. Also you shuoldn't blindly use Win32 dialogs, because the corresponding types in WPF (e.g. Font and Color are "bigger and better" now.)

http://blogs.msdn.com/wpfsdk/archive/2006/10/26/Uncommon-Dialogs--Font-Chooser-and-Color-Picker-Dialogs.aspx

Gishu
+1  A: 

VistaBridge samples have wrappers for some of the vista dialog boxes!

Also check out the wrappers provided by System.Win32 Microsoft.Win32

[UPDATE] `Microsoft.Win32.FileDialog

rudigrobler
Nice to know... but we still need to support XP.
Gishu
Try System.Win32? It should support XP...
rudigrobler
Microsoft.Win32 not System.Win32
rudigrobler
A: 

I know a team working on a WPF application for a couple of years by now, and their feedback is that WPF is still a no match to WinForms when it comes to complicated controls (advanced data grids, tree views and the like). Basic controls are ok though.

Michael Pliskin
OffTopic.. Looks like WPF isn't DONE yet... looks like deadlines had their way. Give it another couple of years... supporting all the myriad things of yore will take some time for a rewrite.
Gishu
Yes that's probably true, it just needs time to mature.
Michael Pliskin
It's also worth mentioning that a lot of complicated WinForms controls are obsolete in WPF - the same functionality is available through templates and bindings (it does require major shift in application structure). "System" dialogs and controls are more of a problem.
ima
A: 

Unfortunately, it does not. However, you can "borrow" some of Windows Forms dialogs by using the Microsoft.Win32 namespace, or you can integrate Windows Forms controls by using the System.Windows.Forms.WindowsFormHost WPF element. Also, you can display Windows Forms dialogs directly by calling the constructor and then invoking the ShowDialog() method on them.

DrJokepu
+1  A: 

Embedding Windows forms using the WindowsFormsHost can cause a lot of problems - especially when dealing rendering\ visibility etc..

Some controls are already implemented by others and could be found over the WEB such as:

NumericUpDown DateTimePicker SplitButton

and of course the new WPFDataGrid

I'm looking for a NumericUpDown in WPF... do you have a link handy to a good one? I've done a search but haven't turned up anything particularly nice.
chaiguy