views:

21

answers:

1

I have a Prism (CAL) shell with defined regions. Each region is responsible for its Navigation Journal and some regions will inherit from the parent.

The issue is that you cannot define Prism regions in a Frame's content template. What is the best approach for implementing NavigationServices in the Shell.xaml and playing nice with Prism.

The following code results in the region manager crying about not finding the regions. I understand why, but would like some input on the best practice.

    <Frame JournalOwnership="OwnsJournal" NavigationUIVisibility="Hidden">
    <Frame.Content>
        <DockPanel>
            <ItemsControl Name="NavigationFrame" DockPanel.Dock="Top" 
                          cal:RegionManager.RegionName="{x:Static p:TopLevelShellRegionNames.NavigationRegion}"/>

            <Grid>
                 <ContentControl Name="ContentFrame" 
                                 cal:RegionManager.RegionName="{x:Static p:TopLevelShellRegionNames.ContentRegion}"/>
            </Grid>                      

        </DockPanel>
    </Frame.Content>
</Frame>

Thanks.

A: 

Defining the region directly in the Frame and defining any content within the frames "Source" or "Content" property was the solution.

 <Frame JournalOwnership="OwnsJournal" cal:RegionManager.RegionName="{x:Static p:TopLevelShellRegionNames.ContentRegion}">
kman_rocks