Windows 8 中的动态磁贴是如何制作的?

发布于 2024-12-04 22:15:49 字数 163 浏览 2 评论 0原文

我搜索了示例、开发人员网站、入门和增强 bla bla bla 页面。

即使在 Google 上使用一些搜索查询,我也看不到有关 Windows 8 中动态磁贴的任何信息。

如何在 Windows 8 中创建动态磁贴?可以使用什么语言来实现? C#? XAML?

I've searched the samples, the developer site, the getting started and the enhancing bla bla bla pages.

Even using some search queries on Google, I can't seem any information on live tiles in Windows 8.

How do I create a live tile in Windows 8? What languages can be used for that? C#? XAML?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

樱花落人离去 2024-12-11 22:15:49

终于弄清楚了,这些动态磁贴正在使用磁贴通知正如其他人所指出的

以下是使用模板更新现有默认磁贴所需的最少代码:

  1. 您必须加载 模板 并调整它,或生成您自己的 XML 代码。请参阅磁贴架构...

    vartileXml=Notifications.TileUpdateManager.getTemplateContent(template); 
    
  2. 您需要创建一个通知,这显然是对磁贴的更新。

    var notification = new Notifications.TileNotification(tileXml); 
    
  3. 您需要创建一个更新程序,它将为您提供通过磁贴进行通知的方法。

    var upd = Notifications.TileUpdateManager.createTileUpdaterForApplication();
    
  4. 如果您拥有所有这些,您可以向客户端发送更新。

    upd.update(通知); 
    

Finally figured it out, these live tiles are using tile notifications as noted by others.

Here is the minimal code necessary for updating an existing default tile with a template:

  1. You have to load in a template and adjust it, or produce your own XML code. See the tile schema...

    var tileXml = Notifications.TileUpdateManager.getTemplateContent(template); 
    
  2. You need to create a notification, which apparently is an update to a tile.

    var notification = new Notifications.TileNotification(tileXml); 
    
  3. You need to create an updater, which will provide you with methods to notify through your tile.

    var upd = Notifications.TileUpdateManager.createTileUpdaterForApplication();
    
  4. If you have all this, you can send an update to the client.

    upd.update(notification); 
    
小伙你站住 2024-12-11 22:15:49

http://msdn.microsoft.com/en-us/library/windows /apps/br211386

您可以使用 C# 或 VB + XAML 或 HTML/JS 或 C++。

这是 BUILD 会议上的重大公告,也是 WinRT 的全部意义(天哪,我希望他们真的认真地推动 WinRT 一年多)。

否则,就会回到我们在第一次预览之后看到的 Silverlight/.Net 起义。 。 。

编辑

您首先需要学习 MetroUI 的术语。您还可以在 Windows Phone 7 下找到更多信息。

动态磁贴可以发送磁贴通知。这就是社交名流在 Facebook 上的动态。操作系统将循环您已声明的磁贴通知。这些都是基本 Tile 示例和高级 Tile 示例中的内容。

此处是 BUILD 事件中所有示例的链接。

此处开始逐步了解该平台。如果参考文档令人困惑,我会从这里开始。

http://msdn.microsoft.com/en-us/library/windows/apps/br211386

You can use either C# or VB + XAML or HTML/JS or C++.

That was the big announcement at the BUILD conference and the whole point of WinRT (God I hope they actually are serious about pushing WinRT for more than a year).

Otherwise it would be back to the Silverlight/.Net uprising that we saw after the first preview. . .

edit

You'll first need to learn the terminology of the MetroUI. You can also find more info under Windows Phone 7.

The Live Tiles can send tile notifications. That's how the socialite tile does the facebook feed. The OS will cycle through tile notifications that you've declared. This is all in the basic Tile sample and the advanced Tile sample.

Here is a link to all the samples from the BUILD event.

Start here for a step by step walkthrough of the platform. I would start there if the reference documentation is confusing.

岁月蹉跎了容颜 2024-12-11 22:15:49

自消费者预览版发布以来,通知文档已更新 - 一个很好的起点是 '选择通知传递方法'文档。

它具有推送、轮询、计划和本地通知的所有相关指针。

The documents for notifications have been updated since the Consumer Preview release - a good starting point is the 'choosing a notification delivery method' document.

It has all of the relevant pointers to push, polling, scheduled and local notifications.

债姬 2024-12-11 22:15:49

可用的 Metro 文档位于:

http://msdn.microsoft.com/en -us/library/windows/apps/

目前还很不完整,但有一些示例,例如:

http://code.msdn.microsoft.com/windowsapps/Advanced-Tiles-Sample -1995ac42

并非所有示例都提供多种语言版本,并且该图块示例仅是 JS,但根据我在其他地方读到的内容,似乎一切都可以用.NET 语言、本机 (C++) 或使用相同 API 的 JS。

The available Metro documentation is here:

http://msdn.microsoft.com/en-us/library/windows/apps/

It's pretty patchy at the moment but there are samples, such as:

http://code.msdn.microsoft.com/windowsapps/Advanced-Tiles-Sample-1995ac42

Not all the samples are available in multiple languages, and that tile example is JS only, but based on what I've read elsewhere, it seems everything can be done with .NET languages, native (C++) or JS using the same APIs.

北陌 2024-12-11 22:15:49

应用磁贴和徽章示例就是您的样子寻找。

App tiles and badges sample is what you are looking for.

心凉怎暖 2024-12-11 22:15:49

NotificationExtension 库(Toast 通知中的 MSDN 示例的一部分,应用程序磁贴通知)非常易于使用。

对于磁贴/toast 通知更新,可以使用以下方法

  1. 直接从应用程序
  2. 从后台任务
  3. 从 WNS(推送通知服务)

msdn 代码示例

NotificationExtension library (part of MSDN sample in toast notification, application tile notification ) is very easy to use.

For tile/toast notification updates following approaches can be used

  1. Directly from the application
  2. From the background tasks
  3. From the WNS (push notification service)

Thorough samples are available in msdn code samples

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文