wpfunity-containerprismregion-management

WPF/Prism : Views return System.Object


I am new to WPF and Prism, but I already learned that you have to register a View in Unity as an object:

Container.RegisterType<Object,MyView>("My.Assembly.MyView");

Still, when I use

var RelativeUriToMyView = new Uri("My.Assembly.MyView",UriKind.Relative);    
RegionManager.RequestNavigate(RelativeUriToMyView, RegionName, CallbackResult);

the MyView displays as System.Object, and the CallbackResult contains no Error.

What am I missing? I'm happy to provide more information if needed.


Solution

  • The issue seemed to be caused by registering the view with its FullName (My.Assembly.MyView) instead of its Name (MyView).

    Edit: Changed the question to more accurately reflect the issue.