Setting ParentRootLayout using MVVM

Feb 25, 2010 at 4:36 PM

I am not sure where to set the ParentRootLayout element since I am using MVVM. I am injecting the floating window into one of my regions (MainChartRegion) in the shell which is in a canvas i.e.

 

    <Grid x:Name="LayoutRoot">
        <Grid ScrollViewer.VerticalScrollBarVisibility="Visible">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <!--Navigation region-->
            <ContentControl regions:RegionManager.RegionName="NavigationRegion" Grid.Column="0"  />
            
<Border Grid.Column="1">
<Canvas>
    <ItemsControl Name="MainChartRegion" regions:RegionManager.RegionName="ChartsRegion" />
</Canvas>
</Border>                 
        </Grid>
    </Grid>

 

    <Grid x:Name="LayoutRoot">
        <Grid ScrollViewer.VerticalScrollBarVisibility="Visible">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>

            <!--Navigation region-->
            <ContentControl regions:RegionManager.RegionName="NavigationRegion" Grid.Column="0"  />

            <Border Grid.Column="1">
                <Canvas>
                    <ItemsControl Name="MainChartRegion" regions:RegionManager.RegionName="ChartsRegion" />
                </Canvas>
            </Border>
        </Grid>
    </Grid>>

When I try to set the ParentRootLayout of the floating window, I get the following error "AG_E_PARSER_BAD_PROPERTY_VALUE". Could you please help me out?