views:

32

answers:

0

I've set only one region in Shell "LoginRegion"

<!-- Login Region -->
<Border Grid.Row="0">
    <ContentControl x:Name="LoginRegion" Regions:RegionManager.RegionName="LoginRegion"
                        VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/>
</Border>

And after login succeeded, I need to remove "LoginRegion" and add 3 other regions with new LayoutRoot grid definitions to Shell from code behind in Login module.

<Grid.RowDefinitions>
    <RowDefinition Height="93"/>
    <RowDefinition />
    <RowDefinition Height="24"/>
</Grid.RowDefinitions>

<!-- Top Region -->
<Border Grid.Row="0">
    <ContentControl x:Name="TopRegion" Regions:RegionManager.RegionName="TopRegion"
                    VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/>
</Border>

<!-- Main Region -->
<Border Grid.Row="1">
    <ContentControl x:Name="MainRegion" Regions:RegionManager.RegionName="MainRegion"
                    Style="{StaticResource TestStyle}"
                    VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/>
</Border>

<!-- Bottom Region -->
<Border Grid.Row="2">
    <ContentControl x:Name="BottomRegion" Regions:RegionManager.RegionName="BottomRegion"
                    VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/>
</Border>

Please help, thank you.