Region Manager can not find region inside of the custom popupwindow

前端 未结 1 472
离开以前
离开以前 2020-11-30 15:03

I have a ShellView using interactivity objects with prism\'s PopupWindowAction for show my custom settings view. And my ShellViewModel contain InteractionRequest object and

相关标签:
1条回答
  • 2020-11-30 15:49

    Probably you need to set the region manager manually, in the popup view's code behind (constructor), like this:

    RegionManager.SetRegionName( theNameOfTheContentControlInsideThePopup, WellKnownRegionNames.DataFeedRegion );
    RegionManager.SetRegionManager( theNameOfTheContentControlInsideThePopup, theRegionManagerInstanceFromUnity );
    

    You'll have to assign a name to the content control hosting the region and somehow acquire the region manager (ServiceLocator.Current.GetInstance<IRegionManager>()).

    0 讨论(0)
提交回复
热议问题