Windows 8 용 간단한 앱을 개발 중입니다. 내 앱에서 시작 타일이 내 앱과 함께 제공되는 로컬 호스트의 이미지를 표시하도록합니다. 예를 들어 나는 /images/tile1.jpg에 내 이미지를 보관하고 있습니다. 내 XML 코드는 /tile1.xml 마찬가지로로컬 호스트의 Windows 8 타일 알림
에 존재
<tile>
<visual>
<binding template="TileWideImage">
<image id="1" src ="http://localhost/images/tile1.jpg" />
</binding>
</visual>
하고 내 default.js 코드는
// For an introduction to the Blank template, see the following documentation:
// http://go.microsoft.com/fwlink/?LinkId=232509
(function() {
"use strict";
WinJS.Binding.optimizeBindingReferences = true;
var app = WinJS.Application;
var activation = Windows.ApplicationModel.Activation;
app.onactivated = function (args) {
if (args.detail.kind === activation.ActivationKind.launch) {
if (args.detail.previousExecutionState !== activation.ApplicationExecutionState.terminated) {
var notifications = Windows.UI.Notifications;
var recurrence = notifications.PeriodicUpdateRecurrence.halfHour;
var urls = [
new Windows.Foundation.Uri("http://localhost/tile1.xml"),
new Windows.Foundation.Uri("http://localhost/tile2.xml"),
new Windows.Foundation.Uri("http://localhost/tile3.xml"),
new Windows.Foundation.Uri("http://localhost/tile4.xml")
];
notifications.TileUpdateManager.createTileUpdaterForApplication().enableNotificationQueue(true);
notifications.TileUpdateManager.createTileUpdaterForApplication().startPeriodicUpdateBatch(urls, recurrence);
} else {
// TODO: This application has been reactivated from suspension.
// Restore application state here.
}
args.setPromise(WinJS.UI.processAll());
}
};
app.oncheckpoint = function (args) {
// TODO: This application is about to be suspended. Save any state
// that needs to persist across suspensions here. You might use the
// WinJS.Application.sessionState object, which is automatically
// saved and restored across suspension. If you need to complete an
// asynchronous operation before your application is suspended, call
// args.setPromise().
};
app.start();
})();
내가 뭐가 잘못 알아낼 단지 드릴 수 없습니다입니다 코드와 함께. 도와주세요.