I am new to WPF application and are developing a new WPF application which does 4 different things (4 different modules).
I was googling around and found regarding WPF composite application.
I was reading through the msdn articles but and a fe开发者_C百科w a different place but all the apps are very large and so understanding them is a bit difficult.
Has anyone got a very simple WPF composite application or any link where i can find it out?
Your question is very broad, but I'll try to give you a few tips.
This is just my $0.02USD since I've reacently approached a similar challenge.
First thing, don't approach this as a WPF composite application, think of it as a composite application that you wish to reflect onto a WPF window. There's a big difference. Each module of your composite should be a self contained, and fully functional unit -- later you can tie some of the functionality to WPF controls. If you try to design this from the ground up to work with and only with a certain WPF interface, you're entering a world of pain with difficult refactoring and untestability.
Research the Model-View-ViemModel (MVVM) approach to WPF application design. For each of your modules create a ViewModel -- which is an adapter class that exposes the functionality of your module ("Model" in MVVM) to a WPF control ("View" in MVVM).
I would suggest you do something like the following:
Design independent classes for each of your 4 modules.
Create 4 Visual Studio "Test Projects" that test each method of your modules.
Create 4 ViewModels that instantiate a single reference to your modules and exposes their functionality, even if these ViewModels seems redundant at first.
Create 4 WPF UserControls that instantiate your ViewModels.
Research WPF data binding and have your UserControls access your modules through and only through their respective ViewModels.
Each of these steps are very broad and will take lots of work, but there are plenty around here that will help you each step of the way once you get into the specifics :D
Good luck!
WPF/Silverlight - Prism - Resources for beginners
I started developing a small app using WPF and PRISM. The msdn article helped me and the have look at the above stackoverflow question..
精彩评论