Prism 4.1 - Actipro v16.1 - Regions not added to the RegionManager

Docking/MDI for WPF Forum

Posted 8 years ago by Stephane Franiatte
Version: 16.1.0633
Platform: .NET 4.5
Environment: Windows 8 (64-bit)
Avatar

(.Net version is actually 4.6.1.)

When trying to load a view using Prism View Discovery (View Injection ends up with the same problem), I get a KeyNotFoundException, as the Region I am trying to load the view into does not exist, even though it was registered in the RegionManager during the initialization.

This used to work perfectly with Actipro 15.1.

This is a critical issue. I (obviously) really, really need to have this working. Note that I cannot use the legacy dlls.

Thanks

Stephane

Comments (8)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I'm sorry you are having trouble.  Could you put together a new simple sample project showing this issue and email it to our support address?  You might even want to just modify our Prism sample project if that is easiest.  Be sure to rename the .zip file extension of what you send so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 7 years ago by Stephane Franiatte
Avatar

I cannot dedicate my time to create a new application out of mine.

I need guidance here as to what may cause the Region to not exist if I use Actipro 16.1, whereas it is there with 15.1 whether I use View Injection or Discovery.

To me the problem may be that I access Regions within the docking windows that are explicitely defined in XAML; I should probably set the RegionManager there. What do you think?

Thanks.

[Modified 7 years ago]

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

That's why I suggested possibly modifying our Prism sample project that ships with the WPF Controls to show it happening, as that may be easier.  Our entire Prism integration source code (like DockSiteRegionAdapter, etc.) is included in that sample project too, so if you see anything wrong in the code, please let us know.

In regards to setting up regions within docking windows explictly defined in XAML, check out the Shell.OnLoaded method.  We have some code there commented out there that you'd want to do.  Does that help?


Actipro Software Support

Posted 7 years ago by Stephane Franiatte
Avatar

Yes, that was it, I had to add the Region to the RegionManager on OnLoaded.

Now it works fine, except that the Quickaccess Menu disappeared from the Ribbon!

Posted 7 years ago by Stephane Franiatte
Avatar

BTW in case I wasn't clear, if I do not set the RegionManager in the Shell.OnLoaded, the QuickAccess menu is there.

Otherwise, it is not there. Help is still needed, and the topic is the same.

Thanks

[Modified 7 years ago]

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

I'm not sure why the region manager load would cause issues in Ribbon without seeing and debugging how you are using the Ribbon.  We don't have any specific Prism functionality implemented for Ribbon.  If you'd like to email our support address with a new simple sample showing the problem, we can have a look.  Please rename the .zip file extension of what you send so it doesn't get spam blocked.


Actipro Software Support

Posted 7 years ago by Stephane Franiatte
Avatar

Well, you know your code better than me. That's the behavior I observe, I believe it to be a bug on your side. It is up to you to address it or not... may I suggest you to try with the PrismIntegration.Unity sln of yours? Just add a Ribbon.

I found a work around, associating RibbonLoaded with some events triggering. Apparently the Ribbon needs to be done loading before the RegionManager can be set in Shell.xaml.vb.

Cheers.

[Modified 7 years ago]

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

We did add a Ribbon with QAT items to the sample with uncommented code in Shell's code-behind and didn't see any problems.  That's why we request samples from customers since we don't know the exact configuration you are using and are otherwise guessing.  By providing a sample, we can see exactly what you see and can make sure any code changes we make fix any problems that are discovered.


Actipro Software Support

The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.