Windows Phone 8.1: How to get a ListView inside a Hub

neochronomo

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?

Daniel Jacobson

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]

編集
0

コメントを追加

0

関連記事

分類Dev

How can i access control name of MapControl inside a Hub Windows Phone 8.1

分類Dev

How to remove line on tapped point inside canvas in Windows Phone 8?

分類Dev

How to use Telegram API in Windows Phone 8?

分類Dev

Windows 8 Live Hub Tile

分類Dev

Windows Phone 8 Progressbar

分類Dev

NavigationDrawer in windows phone 8

分類Dev

How to install Windows Phone 8 workload in Visual Studio 2017?

分類Dev

How to Use IsolatedStorage to Set Lock Screen Background in Windows Phone 8

分類Dev

Windows Phone 8: C# XAML how to detect shape collisions

分類Dev

UnityPlayer crashes on Windows Phone 8

分類Dev

Google maps on windows phone 8

分類Dev

Windows Phone 8 Page Orientation

分類Dev

How to get the values from Listbox on binding in Windows phone?

分類Dev

How to get the version of a Windows Phone 8.1 app in code?

分類Dev

Ellipsis inside button content Windows Phone

分類Dev

How to reset the USB Hub in Windows 10 Commandline

分類Dev

How to access `this` inside a renderRow of a ListView?

分類Dev

add multiple appointmentsTask in windows phone 8

分類Dev

Image not displaying in Windows Phone 8 App

分類Dev

Windows Phone8用のLiveSDK

分類Dev

Windows Phone8のgetrequeststream

分類Dev

Windows Phone8のログ

分類Dev

UploadStringAsync won't work in Windows Phone 8

分類Dev

Getting Local Photos Windows Phone 8 Emulator

分類Dev

windows phone 8 - xaml not found error

分類Dev

Create Dynamically Grid in Windows phone 8

分類Dev

Dynamic Grid.ColumnDefinitions in windows phone 8

分類Dev

AdMob for Windows Phone 8 FailedToReceiveAd NetworkError

分類Dev

Windows Phone8のNavigationDrawer

Related 関連記事

ホットタグ

アーカイブ