Question

I am unable to find a way to implement Smart Parts like SCSF, in wpf prism, can any one suggest a way how to do it, links, articles, appriciated.

Thank you in advance, :)

Was it helpful?

Solution

SmartParts in SCSF was just an abstraction over the simple concept of putting a control on a surface (another control essentially) in dynamic, runtime fashion. You can write that sort of abstraction layer yourself, but it doesn't really buy you anything except added complexity.

I think the important piece to that whole thing was dynamic composition; you could compose your view at runtime using that abstraction.

But you can still do the same thing in WPF. All you need is an IoC container (like StructureMap) and a sensible way to compose UserControls into views. WPF provides you with some nice layout containers (grids, dockpanels, stackpanels) so there really isn't a need to write Workspaces anymore. You just need to not hard-code your views and instead, compose them at runtime (which is easy with the IoC container).

OTHER TIPS

Prism installation does come with a .chm help file you can get it form the codeplex site. The views/usercontrols (which is equivalent to the SCSF smartparts) you create in each module can be displayed on the Shell. You show the view in a region defined in your shell. As you know PRISM as such doesnt come with any guidance package, you need to write all the code needed to set up the application. The help file (.chm) is of much help, you can refer to the Sample hello world source code which comes along with PRISM.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top