WPF Prism Design Question

basil365 used Ask the Experts™
I’m in the process of designing a WPF application that will have quite a complex GUI. I’m trying to decide the best way to develop this and have come across Prism.

The application will allow users to select items from a TreeView. The items (let’s say Buildings) will then be used to create an instance of a custom UserControl which will be loaded on to another container on the interface.

Each Building Control will contain two levels of objects within it (Apartments -> Residents). So, user selects a Building, which contains a variable amount of Apartments, and each Apartment contains a variable amount of Residents. With each level having a distinct UserControl, with separate attributes, operations etc.

When a user selects a Building it will need to retrieve details of that Building and all objects underneath it. The user will then be able to make updates at any level and apply them to the object. All retrieval / updating will be handled in a separate DLL via a few calls from the interface.

What I’m trying to work out is the best design pattern to use for the above situation. I’ve been looking at the examples that come with Prism but I’m not sure which is the best approach.

The Event Aggregation (http://msdn.microsoft.com/en-us/library/ff921173%28v=pandp.20%29.aspx ) makes the most sense to me as one container is sending objects to the other, but as I said this technology is very new to me.

I’d really appreciate any advice at all on how to get started.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior .Net Developer
I would also add you should be looking at MVVM  (Model - View - View model)

model - the data
View Model - your class / business logic built around the data
View - The UI wihch binds to the view model


I usually build from the back forward . . . so when you have your model set generate your classses (either with Linq to SQL or an XSD or something).

From there you can build any custom logic in the classes, verifications, etc.

Then you can build the UI, which again is the layout that will tie to the VM.


This is perfect. Thanks.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial