Then you can see the default tile of your app. If there is no Tile for Your App, then long press on the Icon of Your App and you will get this screen.Īnd select the Pin to Start. So, in ShellTile.Create() that is a navigator to New.xaml with carrying ID=2.īefore doing anything, ensure your current Project app has its Default tile on the Home Screen. And, there we have invoked the item with ID=2.
#Live tiles windows phone code
ShellTile.Create( new Uri( "/New.xaml?ID=2", UriKind.Relative), tile) Īlmost the same few lines, in the first line we have ed two arguments in FirstOrDefault().Īctually, this is LINQ code that defines where to navigate when the Secondary Tile is tapped /pressed. Tile.BackgroundImage = new Uri( "/Icons/Facebook.png", UriKind.Relative) ShellTile secondary = (x => x.NavigationUri.ToString().Contains( "ID=2")) Step 4: Double-click on the second button “Create Secondary Tile”, and put there: Let’s have some more features to add to the Tiles.
#Live tiles windows phone update
With this, we can assign the Background Image.Īnd, in contrary to the front side of the Tile, you can define the content as in the following:įinally, we need to update the Tile so that it can be visible on the Metro Screen. And that can be done as in the following: There is a back side of the Tile that can also be coded. Then the Title, as the name suggests, defines the Title of the Tile as in the following: In the case of an Email app, it may define the number of unread emails in the Inbox. Then we assigned a Count predefined variable that defines some numeric value that can be used for relative purposes. So, next we have assigned the Background Image of the Tile as Android.Png as in the following: In the code above, I have created an object of StandardTileData that will actually be used in the Tile’s description. MessageBox.Show( "Successfully Created !!") Tile.BackBackgroundImage = new Uri( "/Icons/Apple.png", UriKind.Relative)
Tile.BackgroundImage = new Uri( "/Icons/Android.png", UriKind.Relative) StandardTileData tile = new StandardTileData()
Then assign the entire Tile’s Data to its respective fields. ShellTile primary = () Īnd then, check a condition if primary (what we‘ve created just now) is Not Null. Step 3: Now, raise the Click event of the first Button, in other words Create Primary Tile.Īnd there, you need to create a reference for ShellTile and assign it with (). Step 2: Before starting your code, add a namespace for the entire Tile’s classl that is, using. Step 1: Start your Silverlight Project or any Windows Phone and add two Buttons name their Text property as “Create Primary Tile” and “Create Secondary Tile”. We will have nothing in the background except a few classes from and some objects to implement them on. Apart from Live Tiles there are Toast Notification and Raw Notification. In Windows Phone, we have Live Tiles that fulfill the purpose of notification. There are so many apps that use Live Notification in any form.
You have seen notifications for current SMS, Email pop ups, Recent News or it can be current Cricket Score. Notifications are however the most essential feature for any application. It depends on the user, what fascinates him the most. What makes an application more fascinating than others? There are so many reasons to go with.