Regions in ChildWindows + Prims 4 + MVVM + Silverlight

Topics: Prism v4 - Silverlight 4
Dec 21, 2011 at 9:45 PM

Hi I have the following problem, I have a region in a ChildWindows, I call the ChildWindowsin the traditional way "CW.Show ()" command and fill the Region with a view of one of mymodules, the first time this Charging. . works perfect, close the ChildEindows and rebuildgives me to UpdateRegionsExeptions is this? Remove and try to make a closing event inthe ChildWindows and nothing. I could help .. Here my code:

Code that calls the ChildWindows::

        private void NavigateToView(string id)
            WindowsView w = new WindowsView();

            UriQuery parameters = new UriQuery();
            parameters.Add("ID", id);
                                            new Uri("EditView" + parameters.ToString(), UriKind.Relative),

Code of ChilWindows::

        IRegionManager regionManager;
        public WindowsView()
            regionManager = ServiceLocator.Current.GetInstance<IRegionManager>();
            this.SetValue(RegionManager.RegionManagerProperty, regionManager);
            this.Closed += new EventHandler(WindowsView_Closed);
        void WindowsView_Closed(object sender, EventArgs e)

XAML ChildWindows 

<controls:ChildWindow x:Class="Module1.Views.WindowsView"
           Width="723" Height="300" 
           Title="WindowsView"          >
    <Grid x:Name="LayoutRoot" Margin="2">
        <ContentControl prism:RegionManager.RegionName="PopupTestRegion" 
                       VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch" />


Dec 22, 2011 at 7:23 PM
Edited Dec 22, 2011 at 7:25 PM


We tried to reproduce the exception you mentioned without success. You can find the sample I created based on my understanding of your scenario in the my Skydrive account under the name "".

If you still can't find a solution to your problem, it would be helpful if you could provide us with a repro sample application that portrays it, so that we can help you further with this.


Agustin Adami