So I have XAML code for a Hub control, and of course each section of a Hub contains a DataTemplate block. I would like to put my ListView (which has a DataTemplate block of its own) inside one of the Hub sections, but when I try I get the following error:
Duplication assignment to the 'Template' property of the 'DataTemplate' object
What is the issue exactly, and how do I get around this?
If you put the ListView
as a direct child to the HubSection
, then the DataTemplate
is being assigned to both (which it cannot do). If you put the ListView
inside of the DataTemplate
of the the HubSection
, it should work.
So you can try:
<HubSection...>
<DataTemplate...>
<ListView....>
<!--List view stuff (including another <DataTemplate>-->
</ListView>
</DataTemplate>
</HubSection>
それが役立つかどうか教えてください。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加