Home » Source Code » WP dynamic tile sample

WP dynamic tile sample

firstboy0702
2014-10-13 20:34:43
The author
View(s):
Download(s): 0
Point (s): 1 
Category Category:
Windows PhoneWindows Phone C SharpC#

Description

Setting Live Tile's title in background
Quickstart: Update a live tile from a background task
Use a background task to update your app's live tile with fresh content.
Here's a video that shows how to add live tiles to your apps.
Prerequisites

This topic assumes that you can create a basic Windows Store app using C++, C#, or Visual Basic. For 

instructions on how to create your first Windows Store app, see Building your first Windows Store apps using 

C++, C#, or Visual Basic.

To use the code described in this section, you'll need:
Windows 8
Microsoft Visual Studio Express 2012 for Windows 8
Create the background task project

To enable a live tile for your app, add a new Windows Runtime Component project to your solution. This is a 

separate assembly that Windows loads and runs in the background when a user installs your app.

In Solution Explorer, right-click the solution, point to Add, and click or tap New Project.

In the Add New Project dialog, select the Windows Runtime Component template in the Visual C# > Windows 

Store section.

Name the project BackgroundTasks and click or tap OK. Microsoft Visual Studio adds the new project to the 

solution.

In the main project, add a reference to the BackgroundTasks project.
Implement the background task

Implement the IBackgroundTask interface to create a class that updates your app's live tile. Your background 

work goes in the Run method. In this case, the task gets a syndication feed for the MSDN blogs. To prevent 

the task from closing prematurely while asynchronous code is still running, get a deferral.

In Solution Explorer, rename the automatically generated file, Class1.cs, to BlogFeedBackgroundTask.cs.

In BlogFeedBackgroundTask.cs, replace the automatically generated code with the stub code for 

theBlogFeedBackgroundTask class.

In the Run method implementation, add code for the GetMSDNBlogFeed and UpdateTile methods.

Sponsored links

File list

Tips: You can preview the content of files by clicking file names^_^
Name Size Date
description.html11.21 kB2013-06-19 17:48
offline.js1.63 kB2013-06-19 17:48
<Combined.css>0.00 B2013-06-19 17:48
<2f95808e-ca34-4249-88ff-44fabe33cdc0Combined.css>0.00 B2013-06-19 17:48
Galleries.css10.24 kB2013-06-19 17:48
Layout.css1.69 kB2013-06-19 17:48
Brand.css70.15 kB2013-06-19 17:48
iframedescription.css3.29 kB2013-06-19 17:48
license.rtf4.58 kB2013-06-19 17:48
Microsoft45.07 kB2013-06-19 17:48
Readme.htm13.94 kB2013-06-19 17:48
sdkTilesCS.sln1.09 kB2013-06-19 17:48
01.97 kB
App.xaml1.39 kB2013-06-19 17:48
App.xaml.cs5.81 kB2013-06-19 17:48
ApplicationIcon.png1.45 kB2013-06-19 17:48
ApplicationTile.xaml5.54 kB2013-06-19 17:48
ApplicationTile.xaml.cs2.70 kB2013-06-19 17:48
Background.png4.61 kB2013-06-19 17:48
Blue.jpg1.09 kB2013-06-19 17:48
Green.jpg1.09 kB2013-06-19 17:48
MainPage.xaml3.71 kB2013-06-19 17:48
MainPage.xaml.cs1.89 kB2013-06-19 17:48
01.97 kB
AppManifest.xml207.00 B2013-06-19 17:48
AssemblyInfo.cs2.02 kB2013-06-19 17:48
WMAppManifest.xml1.60 kB2013-06-19 17:48
Red.jpg1.09 kB2013-06-19 17:48
sdkTilesCS.csproj5.07 kB2013-06-19 17:48
SecondaryTile.xaml5.70 kB2013-06-19 17:48
SecondaryTile.xaml.cs10.30 kB2013-06-19 17:48
SplashScreenImage.jpg9.20 kB2013-06-19 17:48
...
Sponsored links

Comments

(Add your comment, get 0.1 Point)
Minimum:15 words, Maximum:160 words
  • 1
  • Page 1
  • Total 1

WP dynamic tile sample (65.08 kB)

Need 1 Point(s)
Your Point (s)

Your Point isn't enough.

Get 22 Point immediately by PayPal

Point will be added to your account automatically after the transaction.

More(Debit card / Credit card / PayPal Credit / Online Banking)

Submit your source codes. Get more Points

LOGIN

Don't have an account? Register now
Need any help?
Mail to: support@codeforge.com

切换到中文版?

CodeForge Chinese Version
CodeForge English Version

Where are you going?

^_^"Oops ...

Sorry!This guy is mysterious, its blog hasn't been opened, try another, please!
OK

Warm tip!

CodeForge to FavoriteFavorite by Ctrl+D