I am creating a relatively simple project manager as a Prism learning exercise. The application is built around a collection of Project objects. Each Project has a Tasks property (a collection of Task objects).
There are two main views in the application, and each view is a separate Prism Module:
- The Project View shows a Project and its Tasks.
- The Calendar View shows all Tasks for all Projects that are due on a selected date.
In other words, Tasks are shown in each view. They are displayed on a WPF Toolkit DataGrid.
My Task object has a Notes property (a collection of TaskNote objects). To see a Task's notes in either view, the user double-clicks a task on the DataGrid in the current view, and a dialog pops up with a list of notes for that task. And that's where my
Since the dialog can be invoked from either module, where should it be located? I hate to put a copy of the dialog in each module--that sort of duplication has a code smell to it. Any suggestions at to where to put the Notes dialog? Thanks in advance.