简体   繁体   中英

silverlight 4 error in .xaml

Hi I have the following code:

<navigation:Page 
       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:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
       xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices" 
       xmlns:ds="clr-namespace:EnlacePaginaAlumno.Web.Services"



       xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="EnlacePaginaAlumno.Views.Page1"
       mc:Ignorable="d"
       d:DesignWidth="640" d:DesignHeight="480"
       Title="Page1 Page">
<Grid x:Name="LayoutRoot">




 <riaControls:DomainDataSource  
                                   x:Name="MyData" 
                                   LoadSize="20" 
                                   QueryName="GetAlumnos"
                                    AutoLoad="True">
        <riaControls:DomainDataSource.DomainContext>
            <ds:ServiciosAlumnos></ds:ServiciosAlumnos>
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>

    <Grid.RowDefinitions>
  <RowDefinition Height="0.225*"/>
  <RowDefinition Height="0.775*"/>
 </Grid.RowDefinitions>
 <ScrollViewer Margin="8,44,8,42" Grid.Row="1">
  <StackPanel Height="230" Width="604">
   <sdk:DataGrid x:Name="alumnosGrid" Height="100"/>
  </StackPanel>
 </ScrollViewer>
 <TextBlock Margin="70,32,224,28" TextWrapping="Wrap" Text="Listado de alumnos"/>
</Grid>

but I get the following error:

"Error 1 Property elements cannot be in the middle of an element's content. They must be before or after the content. "

I am newbie and can not find the error!!

Using Silverlight 4, visual estudio 2010, C#

Fixed

       xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="EnlacePaginaAlumno.Views.Page1"
       mc:Ignorable="d"
       d:DesignWidth="640" d:DesignHeight="480"
       Title="Page1 Page">
<Grid x:Name="LayoutRoot">


    <Grid.RowDefinitions>
        <RowDefinition Height="0.225*"/>
        <RowDefinition Height="0.775*"/>
    </Grid.RowDefinitions>

    <riaControls:DomainDataSource  
                                   x:Name="MyData" 
                                   LoadSize="20" 
                                   QueryName="GetAlumnos"
                                    AutoLoad="True">
        <riaControls:DomainDataSource.DomainContext>
            <ds:ServiciosAlumnos></ds:ServiciosAlumnos>
        </riaControls:DomainDataSource.DomainContext>
    </riaControls:DomainDataSource>

    <ScrollViewer Margin="8,44,8,42" Grid.Row="1">
        <StackPanel Height="230" Width="604">
            <sdk:DataGrid x:Name="alumnosGrid" Height="100"/>
        </StackPanel>
    </ScrollViewer>
    <TextBlock Margin="70,32,224,28" TextWrapping="Wrap" Text="Listado de alumnos"/>
</Grid>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM