2015-02-14 7 views
0

Я пытаюсь установить свою главную плитку с шаблоном TileWide310x150SmallImageAndText02. Я посмотрел на образец кода и взял это из него:Плитка Изображение не показано

  ITileSquare310x310SmallImagesAndTextList04 tileContent = 
      TileContentFactory.CreateTileSquare310x310SmallImagesAndTextList04(); 
     tileContent.Image1.Src = "ms-appx:///Assets/Logo.png"; 
     tileContent.TextHeading1.Text = "Cashflow"; 
     tileContent.TextWrap1.Text = "Income: 500"; 
     tileContent.TextWrap2.Text = "Spending: 400"; 
     tileContent.TextWrap3.Text = "Earnings: 200"; 

     // Create a notification for the Wide310x150 tile using one of the available templates for the size. 
     ITileWide310x150SmallImageAndText02 wide310x150Content = 
      TileContentFactory.CreateTileWide310x150SmallImageAndText02(); 
     wide310x150Content.Image.Src = "ms-appx:///Assets/Logo.png"; 
     wide310x150Content.TextHeading.Text = "Cashflow"; 
     wide310x150Content.TextBody1.Text = "Income: 500"; 
     wide310x150Content.TextBody2.Text = "Spending: 400"; 
     wide310x150Content.TextBody3.Text = "Earnings: 200"; 

     // Create a notification for the Square150x150 tile using one of the available templates for the size. 
     ITileSquare150x150PeekImageAndText01 square150x150Content = 
      TileContentFactory.CreateTileSquare150x150PeekImageAndText01(); 
     square150x150Content.Image.Src = "ms-appx:///Assets/Logo.png"; 
     square150x150Content.TextHeading.Text = "Cashflow"; 
     square150x150Content.TextBody1.Text = "Income: 500"; 
     square150x150Content.TextBody2.Text = "Spending: 300"; 
     square150x150Content.TextBody3.Text = "Earnings: 200"; 

     // Attach the Square150x150 template to the Wide310x150 template. 
     wide310x150Content.Square150x150Content = square150x150Content; 

     // Attach the Wide310x150 template to the Square310x310 template. 
     tileContent.Wide310x150Content = wide310x150Content; 

     // Send the notification to the application? tile. 
      TileUpdateManager.CreateTileUpdaterForApplication().Update(tileContent.CreateNotification()); 

Это покажет плитка правильно в 150x150 размер, но не в ширину. Затем отображается только текст, но не изображение.

Вот скриншот:

enter image description here

Спасибо за вашу помощь! NPadrutt

ответ

1

Шаблоны SmallImageAndText показывают изображение только в Windows, а не на телефоне.

Пожалуйста, обратитесь к template catalog.

Tipp: Каталог шаблонов доступен по адресу aka.ms/tiletemplates

Смежные вопросы