两个xaml列的网格

时间:2016-11-29 20:52:48

标签: c# wpf xaml

我尝试在一行和两列的网格中显示彼此相邻的2个xaml页面。我试过这个:

<Window x:Class="HostApplicationWindows.MainWindow"
        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"
        xmlns:local="clr-namespace:HostApplicationWindows"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <local:PluginSelection x:Name="LeftPage" Grid.Column="0" />
        <local:PluginViewBig x:Name="RightPage" Grid.Column="1" />
    </Grid>
</Window>

但是这给了我一个&#34; XamlParseException&#34; (页面只能将Window或Frame作为父级。)

这是什么意思?

0 个答案:

没有答案