Hello, everyone.
I am working on an MVVM / Prism application and I have run into a bit of a snag on how to populate my PanelBar with items. For reference: I am trying to create a layout similar to the one found here. On the referenced page assume that Products and Support are each their own separate modules, and that each item under them represents a view within that module. Now assume that there is security built around both Modules and Views so that only certain people can see them.
I am already dynamically loading my modules via reflection, but I am at a loss on how to do dynamically load my views. To register my views, I would typically do something like this:
RegionManager.Regions["NavRegion"].Add(Container.Resolve<DefaultView>(), "TheDefaultView");
Where "NavRegion" is a custom region that I have a RegionAdapter for. The problem is that I don't see a way to setup my RegionAdapter to get my PanelBar to display in the manner I would like since I can't really build a Hierarchical structure in my RegionAdapter. Is there anyway that I could bind to an XML document that defines the structure of the items? If there is a way to do that, is it possible to append to a bound xml datasource? What I mean is: Module1 has an XML document that defines what views to show, Module2 has an XML document that defines what views to show, and so on.
Thanks for any help you might be able to provide!
I am working on an MVVM / Prism application and I have run into a bit of a snag on how to populate my PanelBar with items. For reference: I am trying to create a layout similar to the one found here. On the referenced page assume that Products and Support are each their own separate modules, and that each item under them represents a view within that module. Now assume that there is security built around both Modules and Views so that only certain people can see them.
I am already dynamically loading my modules via reflection, but I am at a loss on how to do dynamically load my views. To register my views, I would typically do something like this:
RegionManager.Regions["NavRegion"].Add(Container.Resolve<DefaultView>(), "TheDefaultView");
Where "NavRegion" is a custom region that I have a RegionAdapter for. The problem is that I don't see a way to setup my RegionAdapter to get my PanelBar to display in the manner I would like since I can't really build a Hierarchical structure in my RegionAdapter. Is there anyway that I could bind to an XML document that defines the structure of the items? If there is a way to do that, is it possible to append to a bound xml datasource? What I mean is: Module1 has an XML document that defines what views to show, Module2 has an XML document that defines what views to show, and so on.
Thanks for any help you might be able to provide!