尝试定义对象的集合时,项目不再构建,并引发以下错误:
如何在XAML中初始化对象的集合?
我从一个类中创建样本数据的时候遵循与Blend相同的模式,你可能会问我为什么不使用它呢?因为它仅在设计时提供,而不是在运行时。
<echoNestModel:dboTrackProfile x:Key="dboTrackProfile"
Title="El Amor"
AnalyzerVersion="3.13"
Artist="Joeski"
ArtistId="4564123113"
AudioMd5="HJK34YKUGH34J3"
Bitrate="320"
PreviewUrl="http:\\www.echonest.com"
Release="El Amor Remixes"
ReleaseImage="image"
Samplerate="44100"
SongId="4U623784Y2HJ"
Status="OK"
dboId="19">
<!-- errors from here -->
<echoNestModel:dboTrackProfile.dboForeignReleaseIds>
<echoNestModel:dboForeignReleaseId dboId="54" Value="Rutrum vivamus sapien tristique" />
<echoNestModel:dboForeignReleaseId dboId="70" Value="Parturient vestibulum" />
<echoNestModel:dboForeignReleaseId dboId="71" Value="Sed aliquam ultricies morbi vestibulum" />
<echoNestModel:dboForeignReleaseId dboId="69" Value="Adipiscing senectus sociosqu aliquet parturient" />
<echoNestModel:dboForeignReleaseId dboId="43" Value="Suscipit sem" />
<echoNestModel:dboForeignReleaseId dboId="25" Value="Torquent sit" />
<echoNestModel:dboForeignReleaseId dboId="23" Value="Semper venenatis" />
<echoNestModel:dboForeignReleaseId dboId="16" Value="Blandit vulputate vel vestibulum ultrices" />
<echoNestModel:dboForeignReleaseId dboId="29" Value="Vehicula erat volutpat nulla" />
<echoNestModel:dboForeignReleaseId dboId="30" Value="Eros maecenas nibh curabitur proin" />
</echoNestModel:dboTrackProfile.dboForeignReleaseIds>
<!-- to here -->
</echoNestModel:dboTrackProfile>
答案 0 :(得分:0)
原因是该属性(由OpenAccess ORM生成)没有设置器。