Hi!
It seems that XamDockManager doesn't work with MEF RegionManager...
Is this true, or is ther some solution?
Hi,
I am not sure what do you mean by MEF RegionManager.
Could you provide more details about the scenario you are aiming at.
Regards,
Yes, I can.
MEF means "Managed Extensibility Framework" and you can find it here: http://mef.codeplex.com/
MEF allow us to build Modular Applications, by importing/exporting classes, etc.
One of this capabilities is to create regions where we can inject views.
In our application, we already use infragistics XamRibbon and Infragistics XamTileView with MEF, and it works as expected.
Our current DockManager is from other vendor, and it also works as expected.
Now, we are trying to use only insfragistics components in our Main Shell, so we are trying to change to XamDockManager, but it seems that, although MEF is able to successful register the region, it is incapable of add items (ContentPane in this cenario) to XamDockManager.Panes...
No exception is thrown...
Sorry i misunderstood you...
try the following...
Manualy add a ContentPane to the DockManager, and inside that pane add a ContentControl. Apply a region to that ContentControl and try to show a view into that region...
Does it work?
I've done as you said...
Still not works.
I had to create a new "RegionAdapter" for the "ContentPane", and register it within "MefBootstrapper"
It enters the RegionAdapter, and calls for the method "CreateRegion()", but the region isn't added to RegionManager.
With all other controls, the region is successfully added to the RegionManager after "CreateRegion()", in this case (XamlDockManager) it isn't...
NOTE: We have several controls working this way, all of them working fantastic. This has been a routine job for us. "XamlDockManager" is the only one with this strange behavior...
I think infragistics should answer this...
you did not try to add a ContentControl inside the ContentPane and attatch cal:Region to the ContentControl...
This should work...
In my point of view, this has nothing to do with having a "ContentControl" inside the "ContentPane" or whatever...
The main issue here, is the region not been registered in RegionManager.
Sadly, I've found out, that this is comun problem with infragistics constrols...
Take a look at here:
http://community.infragistics.com/forums/p/39320/224079.aspx
and here:
http://community.infragistics.com/forums/p/40612/227531.aspx
http://forums.infragistics.com/forums/p/30026/156772.aspx
http://blogs.infragistics.com/forums/t/42884.aspx
and so on...
We are giving up of this control...
Sorry for the delayed response, i was on vacation last week.
I've attached a sample showing the XamDockManager working with regions. Note: this is just a simple example and isn't using a MEF region, however, from what i gather you were having trouble loading any region.
To run the sample, just unzip it, and add references to your IG assemblies.
If this sample doesn't work for you, or does work but doesn't cover your case, i'd be more than happy to work with you to more closely identify the problem you're running into.
-SteveZ