Register default RegionManager view using XAML

Topics: Prism v4 - Silverlight 4
Feb 16, 2012 at 4:39 PM


Given this:

<ContentControl prism:RegionManager.RegionName="MainRegion" />

How can I set the default content using XAML, instead of using C# code (RegisterViewWithRegion method)?


Desired situation:

<ContentControl prism:RegionManager.RegionName="MainRegion" >
<TextBlock Text="Content not yet loaded or registered..." />



Feb 16, 2012 at 5:25 PM

What I've used before is putting multiple items in the same row on a grid.

In my case it was putting a splach screen background graphic up, then injecting a view overtop.  If the injected view has an opaque background, it covers the splash.

<Image Source="...your image source" Grid.Row="0" />

<ContentControl prism:RegionManager.RegionName="MainRegion" Grid.Row="0" />

I would think you could put any xaml controls in there just make sure the injected region has something like a grid container with an opaque background to cover what is visible in the parent view.