How are live tiles made in Windows 8?

36,926

Solution 1

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.

Solution 2

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); 
    

Solution 3

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.

Solution 4

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.

Solution 5

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

Share:
36,926
Tamara Wijsman
Author by

Tamara Wijsman

In my free time I visit Stack Exchange to help out people with their questions and help maintain the community. Located in Belgium, I have studied Computer Science at the University of Antwerp and became a Master in Software Engineering. When I think a post can be improved I will try to do so by fixing grammatical or spelling errors, clarifying meaning without changing it, correcting minor mistakes, adding related resources or links. For the less obvious things of those I will leave a note in the edit, click on the date to see this. I will only edit content in posts once, and let the author or other users be free to choose to rollback; when there are opposing views, we can raise this to meta to let the majority decide which revision of the post they want. This will be done with respect of the original author and when I'm sure enough that it would only improve the post. Have a nice day! :)

Updated on February 26, 2020

Comments

  • Tamara Wijsman
    Tamara Wijsman about 4 years

    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?

  • Tamara Wijsman
    Tamara Wijsman over 12 years
    I've found Creating and using tiles, toast, and Windows push notifications, it however doesn't display how to update tiles and I can't seem to find a sample that updates a tile with live information (and perhaps an animation) and don't know where I would need to look in the code. The TileUpdateManager lists no sample code for this, so I'm clueless... :(
  • Tamara Wijsman
    Tamara Wijsman over 12 years
    Now, how do I get the tile to update? The documentation is confusing, there doesn't seem to be an example or tutorial that explicitly shows how to update a tile... :(
  • surfasb
    surfasb over 12 years
    You are looking for tile notifications.
  • Tamara Wijsman
    Tamara Wijsman over 12 years
    +1 I thought a notification was supposed to interrupt the user to notify him somethnig, how's that called?
  • surfasb
    surfasb over 12 years
    @Tom wijsman: To grab the user's attention, you should use a Toast notification. Toasts are those small windows that slide out on the lower right.