To illustrate the role that Visual Studio plays in WPF application development, let’s build a sample application from scratch. In the tradition of “experience first,” let’s select something that can benefit from WPF’s strong suits—namely, visualizations and robust control layouts and templating.
Consider an image viewer application. We can use this application to view a list of image thumbnails and, after selecting a thumbnail, we can view the image itself and even make changes to it.
We target the rough design shown in Figure 21.23.
Here are our base requirements:
When the application loads, it parses the images contained in the specified folder.
Every image is listed in a list box; the list box shows image thumbnails and no text.
When the user clicks one of the items in the list box, the image viewing area is populated with the selected image.
The user can then choose to manipulate the image: a black-and-white effect can be applied, the image can be rotated clockwise or counterclockwise, the image can be flipped, and it can be mirrored.
In general, we try to use WPF’s capabilities when possible to make the application more visually compelling; a standard battleship gray application is not what we are looking for here.