This is a migrated thread and some comments may be shown as answers.

multiple tiles?

4 Answers 36 Views
LiveTileHelper
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
brandon
Top achievements
Rank 1
brandon asked on 20 May 2014, 08:38 PM
i'm using live tile helper to pin "custom" tiles to the start screen, right now i'm allowing users to choose the color of the tile, add text or make a transparent tile.  but right not if i go back in to the app and make a change to my tile it pins over the top of the existing tile. is it possible to create a new tile everytime? that way the user could make different colored tile or multiple transparent tiles?

thanks

4 Answers, 1 is accepted

Sort by
0
Todor
Telerik team
answered on 21 May 2014, 06:45 AM
Hello Brandon,

The secondary tiles are distinguished by their Uri, so if you want to create a new tile that points to the same page but has a different Uri, you can use something like this:
Uri uri = new Uri("/MainPage.xaml?id=1", UriKind.RelativeOrAbsolute);

Instead of the static number "1" in the example you can use the value of a variable which counts how many tiles you have already pinned.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
brandon
Top achievements
Rank 1
answered on 22 May 2014, 02:42 AM
getting close i think!

i created this when i pin a tile

  private void btnPin_Click(object sender, RoutedEventArgs e)
        {
           
   
            if(appSettings.Contains("tileCount"))
            {
                int count = (int)appSettings["tileCount"];
                tileCount = count + 1;
                appSettings["tileCount"] = tileCount;
                appSettings.Save();


which increase tileCount by 1 each time  a new tile is pinned and then i added this

Uri uri = new Uri("/MainPage.xaml?id=tileCount", UriKind.RelativeOrAbsolute);


but it is still overwriting my tile i also tried ?id=tileCount() but got the same results. am i doing something wrong?

thanks


0
Accepted
Todor
Telerik team
answered on 22 May 2014, 07:54 AM
Hello Brandon,

It seems that you provide the string "tileCount" as id instead of the value of the variable with that name. Try with:

Uri uri = new Uri(String.Format("/MainPage.xaml?id={0}", tileCount), UriKind.RelativeOrAbsolute);

I hope this information helps.

Regards,
Todor
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
brandon
Top achievements
Rank 1
answered on 22 May 2014, 05:24 PM
works great! thanks
Tags
LiveTileHelper
Asked by
brandon
Top achievements
Rank 1
Answers by
Todor
Telerik team
brandon
Top achievements
Rank 1
Share this question
or