Xaml silverlight Prism项目中的页面布局

Xaml silverlight Prism项目中的页面布局,xaml,layout,silverlight-4.0,prism,Xaml,Layout,Silverlight 4.0,Prism,好的,我试过问这个问题,但没有成功。尝试了一些类似的黑客;如果我错了,请纠正我,但我认为这不是最好的办法 我想做的是让silverlight应用程序跨越整个浏览器区域。我在上一个问题中提供的解决方案适用于标准silverlight项目,但对于silverlight Prism项目,似乎不适用相同的规则。我认为这与包含页面的silverlight模块有关,该页面的主用户控件加载在Shell.xaml的内容控件中 有人知道如何解决这个问题吗 my Shell.xaml的代码如下: <UserC

好的,我试过问这个问题,但没有成功。尝试了一些类似的黑客;如果我错了,请纠正我,但我认为这不是最好的办法

我想做的是让silverlight应用程序跨越整个浏览器区域。我在上一个问题中提供的解决方案适用于标准silverlight项目,但对于silverlight Prism项目,似乎不适用相同的规则。我认为这与包含页面的silverlight模块有关,该页面的主用户控件加载在Shell.xaml的内容控件中

有人知道如何解决这个问题吗

my Shell.xaml的代码如下:

<UserControl x:Class="MyNamspace.Shell"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:Regions="http://www.codeplex.com/prism"
Background="#FF2D8543"  
         >

<ContentControl Regions:RegionManager.RegionName="MainRegion" 
Background="Black" 
VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"


 >
</ContentControl>

在Shell.xaml的Contentcontrol中注册的Modulepage的xaml

<UserControl x:Class="MyNamspace.MyClass"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
MinHeight="800" MinWidth="800"
 >
<UserControl.Background>
    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="Black" Offset="0"/>
        <GradientStop Color="#FF2D8543" Offset="1"/>
    </LinearGradientBrush>
</UserControl.Background>
<Grid x:Name="LayoutRoot" Background="#FFEB0A0A" 
VerticalAlignment="Top" HorizontalAlignment="Center"
 >
    <Grid.ColumnDefinitions> 
        <ColumnDefinition Width="*" /> 
        <ColumnDefinition Width="*" /> 
    </Grid.ColumnDefinitions> 
    <Grid.RowDefinitions> 
        <RowDefinition Height="Auto" /> 
    </Grid.RowDefinitions> 

    <sdk:Label Height="23" HorizontalAlignment="Left" Margin="64,85,0,0" Name="label1" 
    VerticalAlignment="Top" Width="252" Content="Login page here" />
</Grid>

我之所以使用不同的颜色,是因为我想知道Shell的usercontrol在哪里,Contentcontrol在哪里。我的模块页面也是如此


再次感谢……

LayoutRoot
中删除
垂直对齐
水平对齐
作业