江湖救急,高分(100)。这是什么错误啊?
错误内容:
错误1分析规则 Element ::= . EmptyElement | ( StartElement ElementBody ). 中的意外 PROPERTYELEMENT。E:\Test\SLReportTest\SLReportTest\MainPage.xamlSLReportTest
问题:这是什么错误??? 应该如何修改??? 谢谢各位大师。
对应的详细XAML如下,其中用了第三方的控件“RadGridView”。
<UserControl x:Class="SLReportTest.MainPage"
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:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
d:DesignHeight="543" d:DesignWidth="1100" Width="Auto" Height="Auto" >
<Grid x:Name="LayoutRoot" Background="White">
<telerik:RadGridView x:Name="rgv_list" Grid.Row="1" AutoExpandGroups="True"
ShowColumnFooters="False" ShowGroupFooters="True"
AutoGenerateColumns="False" ShowGroupPanel="False"
IsReadOnly="True" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed"
CanUserResizeColumns="True" >
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Width="*" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
<telerik:GridViewDataColumn.Header xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" >
<Grid Name="gdGrid4" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.RowDefinitions >
<RowDefinition Height="20*" />
<RowDefinition Height="1" />
<RowDefinition Height="20*" />
<RowDefinition Height="1" />
<RowDefinition Height="20*" />
<RowDefinition Height="1" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions >
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
</Grid.ColumnDefinitions>
<ContentPresenter Content="2013电量报表" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="18" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Height="1" Visibility="Visible" Grid.Row="1" Grid.ColumnSpan="18" />
<ContentPresenter Content="用户单位:阿迪锅" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="4" Grid.Column="0" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="1" />
<ContentPresenter Content="能源类型:用电" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="4" Grid.Column="6" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="3" />
<ContentPresenter Content="编号:43" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="4" Grid.Column="13" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="5" />
<ContentPresenter Content="编号" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="0" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="1" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="3" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="4" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="5" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="6" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="7" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="8" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="9" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="10" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="11" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="12" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="13" />
<ContentPresenter Content="用电量" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="14" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="15" />
<ContentPresenter Content="金额" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="16" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="17" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Height="1" Visibility="Visible" Grid.Row="3" Grid.ColumnSpan="18" />
</Grid>
</telerik:GridViewDataColumn.Header>
<telerik:GridViewDataColumn.CellTemplate xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" >
代码未完,下面继续。。。
[解决办法]
一、 <telerik:GridViewDataColumn Width="*" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView">
二、 <telerik:GridViewDataColumn.Header xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" >
三、 <telerik:GridViewDataColumn.CellTemplate xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" >
一、 <telerik:GridViewDataColumn Width="*">
二、 <telerik:GridViewDataColumn.Header>
三、<telerik:GridViewDataColumn.CellTemplate>
<telerik:RadGridView x:Name="rgv_list" Grid.Row="1" AutoExpandGroups="True"
ShowColumnFooters="False" ShowGroupFooters="True"
AutoGenerateColumns="False" ShowGroupPanel="False"
IsReadOnly="True" CanUserFreezeColumns="False" RowIndicatorVisibility="Collapsed"
CanUserResizeColumns="True" >
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Width="*">
<telerik:GridViewDataColumn.Header>
<Grid Name="gdGrid4" xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid.RowDefinitions >
<RowDefinition Height="20*" />
<RowDefinition Height="1" />
<RowDefinition Height="20*" />
<RowDefinition Height="1" />
<RowDefinition Height="20*" />
<RowDefinition Height="1" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions >
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
<ColumnDefinition Width="50*" />
<ColumnDefinition Width="1" />
</Grid.ColumnDefinitions>
<ContentPresenter Content="2013电量报表" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="18" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Height="1" Visibility="Visible" Grid.Row="1" Grid.ColumnSpan="18" />
<ContentPresenter Content="用户单位:阿迪锅" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="4" Grid.Column="0" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="1" />
<ContentPresenter Content="能源类型:用电" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="4" Grid.Column="6" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="3" />
<ContentPresenter Content="编号:43" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.ColumnSpan="4" Grid.Column="13" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="5" />
<ContentPresenter Content="编号" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="0" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="1" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="2" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="3" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="4" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="5" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="6" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="7" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="8" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="9" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="10" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="11" />
<ContentPresenter Content="名称" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="12" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="13" />
<ContentPresenter Content="用电量" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="14" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="15" />
<ContentPresenter Content="金额" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Column="16" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Visibility="Visible" Grid.Row="4" Grid.Column="17" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Height="1" Visibility="Visible" Grid.Row="3" Grid.ColumnSpan="18" />
</Grid>
</telerik:GridViewDataColumn.Header>
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate >
<StackPanel Orientation="Horizontal" >
<TextBlock Width="49" Text="{Binding L,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding S,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding M,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding XL,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding XXL,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding XL3,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding XL,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding Liu,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
<TextBlock Width="49" Text="{Binding Yang,Mode=TwoWay}" TextAlignment="Right" />
<Rectangle Fill="#FF0B1D1D" VerticalAlignment="Stretch" Width="1" Height="23" Visibility="Visible" />
</StackPanel>
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>
</telerik:RadGridView.Columns>
</telerik:RadGridView>