August 2010
Intermediate to advanced
1224 pages
34h 17m
English
The last item on our to-do list is allowing the user to change the path of the picture files. WPF itself doesn’t have any built-in dialog box classes to manage this, but the System.Windows.Forms namespace has just what we need: the FolderBrowserDialog class. This is launched from within the event handler for our FolderOpenMenuItem click event:

When a user selects a folder, we update our internal field appropriately, reload the DirectoryImageList class with the new path, and then reset our window’s DataContext property to reflect the change. This is a perfect example of how seamless it is to use other .NET ...