views:

40

answers:

2

I'm doing a VB.Net subject at university and the major assignment is the creation of a WPF application.

The application is management-focused (adding, modifying, deleting entries, etc). As these are all rather disparate tasks I'm thinking to create a tabbed interface for my assignment (in a similar vein to Spybot's interface: http://www.2-spyware.com/images/data_images/spybot-search-and-destroy1.jpg).

I'm a bit confused as to how I should go around approaching this? Btw, would this classify as MDI?

We were recommended to create a menu system that listed all the options - upon selecting an option, a new window would be opened, the interaction would take place. If the user wanted to do something else, he'll close the window to be taken back to the menu screen.

This doesn't really seem like an elegant approach to me and it seems like it'll be an interesting exercise to implement the tab-based system I explained.

I'd appreciate if anyone could point me in the right directions or give any hints as to how I should achieve. Is it possible, for example, to create each option in a separate xaml/code-behind file and then 'plug' these into each tab?

edit: To clarify, let's take a hypothetical of an indoor soccer team management system. Let's say there are five different tasks the user can perform: 'Register a player', 'Modify players', 'Register a team', 'Modify team details', 'Add player to team'.

Each task is separate from the next. One way of creating the application is to create a main page with a button for each task. When a user click on each button, a new window opens up (for example, if the user clicks 'Register a player', a new PlayerRegistration window is opened).

What I'm looking for, as mentioned above, is a tab-based approach. In my application, if the user clicks 'Register a player' the entire PlayerRegistration xaml file gets loaded in a segment of the window. The same happens when the user clicks any other button.

I suppose one way to think of it would be a website that uses frames.

Note: if you think my aim isn't really appropriate and that there's a better way to lay out my application, I'd love to hear some suggestions.

+1  A: 

You can have a look into composite application development, mono addins (can use this for plugin architecture) in combination with a shell.

bjoshi
+2  A: 

Have you heard about the MVVM pattern ? Have a look at this article by Josh Smith, the example he uses does something similar to what you want.

If you only want one view to be visible at a time, you can use a ContentControl instead of a TabControl, and bind its content to a Current property in your main ViewModel.

Thomas Levesque
Looks promising. Seems like it's be useful. Thanks.
NRaf