C# Windows Phone 8.1应用程序在数据模板中看不到数据类型属性

C# Windows Phone 8.1应用程序在数据模板中看不到数据类型属性,c#,xaml,windows-phone-8.1,datatemplate,C#,Xaml,Windows Phone 8.1,Datatemplate,我创建了新的Windows Phone 8.1项目,当我尝试设置时,vs2013在编辑器中给我提示错误:在类型“DataTemplate”中找不到属性“DataType”。在WPF应用程序中,我没有这个问题。如何修复它 这是我的MainPage.xml: <Page x:Class="App6.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="ht

我创建了新的Windows Phone 8.1项目,当我尝试设置时,vs2013在编辑器中给我提示错误:
在类型“DataTemplate”中找不到属性“DataType”
。在WPF应用程序中,我没有这个问题。如何修复它

这是我的MainPage.xml:

<Page
    x:Class="App6.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:App6"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

    <Page.Resources>
        <DataTemplate DataType="{x:Type local:Employee}">
            <TextBlock Text="{Binding Name}" />
        </DataTemplate>
    </Page.Resources>

    <Grid>

    </Grid>
</Page>

WinRT XAML中不支持数据类型-请参阅。你也可以找到这些信息


可能会对您有所帮助,这里有一些帮助:,。

WinRT XAML(通用应用程序)、Windows Phone 8不支持数据类型

要为每种类型使用不同的模板,必须