TileUpdater.Update(TileNotification) Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Menerapkan perubahan konten atau tampilan ke petak peta.
public:
virtual void Update(TileNotification ^ notification) = Update;
void Update(TileNotification const& notification);
public void Update(TileNotification notification);
function update(notification)
Public Sub Update (notification As TileNotification)
Parameter
- notification
- TileNotification
Objek yang menyediakan definisi XML baru untuk konten petak peta.
Contoh
Contoh berikut menunjukkan Pembaruan yang digunakan untuk mengirim pemberitahuan ke petak peta aplikasi.
function sendTileTextNotification() {
var Notifications = Windows.UI.Notifications;
// Get an XML DOM version of a specific template by using getTemplateContent.
var tileXml = Notifications.TileUpdateManager.getTemplateContent(Notifications.TileTemplateType.tileWide310x150Text03);
// You will need to look at the template documentation to know how many text fields a particular template has.
// Get the text attribute for this template and fill it in.
var tileAttributes = tileXml.getElementsByTagName("text");
tileAttributes[0].appendChild(tileXml.createTextNode("Hello World!"));
// Create the notification from the XML.
var tileNotification = new Notifications.TileNotification(tileXml);
// Send the notification to the calling app's tile.
Notifications.TileUpdateManager.createTileUpdaterForApplication().update(tileNotification);
}
Berlaku untuk
Lihat juga
- Sampel petak peta dan lencana aplikasi
- Mulai cepat: Mengirim pembaruan petak peta
- Gambaran umum pemberitahuan petak dan petak peta
- Katalog templat petak peta
- Panduan dan daftar periksa petak peta
- Cara menjadwalkan pemberitahuan petak peta
- Cara menggunakan antrean pemberitahuan dengan pemberitahuan lokal
- Cara menyiapkan pemberitahuan berkala untuk petak peta
- Skema XML petak peta
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk