Windows의 기념일 빌드를 대상으로하는 새로운 UWP 빈 응용 프로그램 프로젝트를 만들고 있습니다.UWP : DataTemplate에서 x : DataType 속성을 사용할 때 컴파일 오류가 발생했습니다.
namespace App1
{
public class BindyThing
{
}
}
:
<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 파일에 다음과 같이 선언 : 여기 (기본 템플릿에서 MainPage.xaml라는) 내 유일한 페이지의 마크 업입니다 위의 마크 업에서 볼 수 있듯이 BindyThing을 렌더링하는 DataTemplate을 만들려고합니다. 내가 컴파일 할 때, 나는 다음과 같은 오류가 발생합니다 : 내가 DataTemplate을의 선언을 주석 할 때
The XAML Binary Format (XBF) generator reported syntax error '0x09C4' : Property Not Found
이 오류가 사라집니다. 왜 내가 이걸 얻었는지에 대한 통찰력이있는 사람 있습니까? 모든 도움을 주셨습니다. 고맙습니다!
그래, 맞아. 나는 그것을 찾지 못했다고는 믿을 수 없다. 감사! – Jammer
동일한 문제가 발생했으며 'DataTemplate'이 비어 있지 않습니다. 그것은 App.xaml에서 정의됩니다. 만약 단순히 참조하고있는 곳으로 옮기고'x : Key' 속성을 지우면 같은 템플릿이 잘 동작합니다. – dotNET
@dotNET 만약 당신이 그 문제에 무엇이 잘못되었는지를 발견했다면 나는 행복하다는 것을 알게 될 것이다. 나는 똑같은 성가신 문제가있다. – NoOne