February 2013
Beginner to intermediate
68 pages
1h 50m
English
WPF still doesn’t offer a counterpart for the FolderBrowseDialog control in Windows Forms, so let’s create one. Follow these steps:
1. Create a new project of type WPF User Control.
2. Add references to System.Windows.Forms.dll and WindowsFormsIntegration.dll.
3. Add a new code file called WpfFolderBrowseDialog, which is where you write custom code.
Now let’s start thinking in a WPF-oriented way. Since the original FolderBrowseDialog control from Windows Forms has its own properties (such as SelectedPath or Description), it can be interesting to expose them to the external world so that users can use information sent by the control, or set its properties. Since the value of these ...