【发布时间】:2016-12-27 15:03:17
【问题描述】:
我正在创建一个针对 Windows 周年版本的新 UWP 空白应用项目。这是我唯一页面的标记(默认模板命名为 MainPage.xaml):
<Page
x:Class="App1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:App1"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<Grid.Resources>
<DataTemplate x:Key="MyDataTemplate" x:DataType="local:BindyThing">
</DataTemplate>
</Grid.Resources>
</Grid>
BindyThing 类在 CS 文件中声明如下:
namespace App1
{
public class BindyThing
{
}
}
从上面的标记可以看出,我正在尝试创建一个 DataTemplate 来呈现 BindyThing。但是,当我编译时,我收到以下错误:
The XAML Binary Format (XBF) generator reported syntax error '0x09C4' : Property Not Found
当我注释掉 DataTemplate 的声明时,此错误消失。有没有人知道我为什么会得到这个?所有帮助表示赞赏。谢谢!
【问题讨论】: