The "Me" tile

13 posts, 1 answers
  1. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 23 Feb 2012 Link to this post

    Hi,
    since I know your excellent support I'll be lazy and ask here instead of searching the web.
    What I'm looking for is the ability to have a tile like the "Me" tile.
    It does:
    Display an image on the front.
    Later it scrolls some text ("Me") over the half of this image.
    Then it turns and shows the backside with some text and "me" on the last line.

    Two things to notice:
    a.) The tile uses the Accent Color except for the image.
    b.) the background is dynamic - so if something happens the text changes

    Is this possible with the telerik LiveTileHelper?

    Regards
    Manfred
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 24 Feb 2012 Link to this post

    Hello,

    If you are asking to have such a tile on the home screen of the device - yes it is possible. Chek our example for the LiveTileHelper - it does exactly this.

    If you want to have such a tile in your application - then the answer is that we are working on this and soon you will be able to include such HubTile into your app.

    Regards, Valentin.Stoychev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 24 Feb 2012 Link to this post

    Hi Valentin,

    I already checked the example.
    But there is
    a.) no "half tile filling"
    b.) no background update

    And as seen in a different thread somewhere here it seems to be impossible to change the image from a background thread.
    And since your LiveTileHelper uses an image I guess this wont work.

    But I'm not sure - that's why I'm asking if this is possible.

    Regards
    Manfred
  5. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 24 Feb 2012 Link to this post

    Hi,

    I understand now what you mean.

    No there is no "haf tile filling". This is not supported from SL framework. We are allowed to add only a static image to the tile, without animations.

    Updates in backgrounds are possible, but not related to our LiveTileHelper component. With LiveTileHelper you can generate the images and later to only assign these images from the background thread.

    All the best, Valentin.Stoychev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  6. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 24 Feb 2012 Link to this post

    Thank your for the fast response.

    You say I can create Images and assign it later.
    In other words - I can't create the images in a background worker?

    So how to change the content dynamically?
    Let's say I have an RSS reader.
    When I find a new item I want to show a few words of it on the background of the tile.
    And if it is an important item I want to paint (lets say) a star on it.

    Does LiveTileHelper support the image generation (in a background worker - repeated schedule)?
    Or do I only have the API possibility to set the Text of the Tile?

    Manfred
  7. Answer
    Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 24 Feb 2012 Link to this post

    Hi,

    You can't create an image from the background thread - it is just limited in functionality (not related to Telerik, but to the platform).

    But, you can change everything on the live tile -
     - the text, the background image, the count.

    So in the RSS scenario you can update the tile text with the new titles, and if you want to have a "star symbol" you can change the background image with one that was generated before.



    Greetings, Valentin.Stoychev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  8. Radim
    Radim avatar
    6 posts
    Member since:
    Mar 2012

    Posted 14 Mar 2012 Link to this post

    Hi, I think ManniAT is talking about BackgroundAgent like Periodic Task (ScheduledTaskAgent class).
    So the question is; can we use LiveTileHelper (somehow) from within BackgroundAgent eg. inside Periodic task dll? 
    Or is there som another control to use it in this case?
    I think it's common (in WP7.5) to update the Tile in the background.



     
  9. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 15 Mar 2012 Link to this post

    Hello,

    Yes - we understand the question and agree that this is pretty common scenario. Unfortunately these agents are limited in functionality by the OS and you can't render any UI elements there. Please refer to my previous answer to see what is possible in this case.

    Kind regards, Valentin.Stoychev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  10. Radim
    Radim avatar
    6 posts
    Member since:
    Mar 2012

    Posted 15 Mar 2012 Link to this post

    No, you're not completely right. You can do "a lot of work" and you even can render UI elements.
    In my BackgroundAgent's code I normally do something like:

    TextBlock temperatureTextBlock = new TextBlock();
    temperatureTextBlock.Text = temperature;
    temperatureTextBlock.FontSize = 34;
    temperatureTextBlock.Foreground = fontForeground;
    temperatureTextBlock.FontFamily = fontFamily;
    temperatureTextBlock.FontWeight = FontWeights.SemiBold;
    temperatureTextBlock.Width = 95;
    temperatureTextBlock.TextAlignment = TextAlignment.Right;
    ...
    ...
    var bitmap =
    new WriteableBitmap((int)tileSize.Width, (int)tileSize.Height);
    bitmap.Render(backImage, new TranslateTransform()
    {
        X = 0, // Left margin offset.
        Y = 0 // Top margin offset.
    });
     
    // Render the temperature text.
    bitmap.Render(temperatureTextBlock, new TranslateTransform()
    {
        X = 68,
        Y = 4
    });
     
    // Render the time of the day text.
    bitmap.Render(timeOfDayTextBlock, new TranslateTransform()
    {
        X = 88,
        Y = 110
    });
     
    var img = bitmap.ToImage();
    var encoder = new PngEncoder();
    encoder.Encode(img, stream);
    ...

  11. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 15 Mar 2012 Link to this post

    Hello Radim,

    This is different than the initial tests we had. Now I tested again and what you are saying seems to be possible.

    In this case we will evaluate again what options we have and will get back to you with the decision we have made.

    Regards, Valentin.Stoychev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  12. Radim
    Radim avatar
    6 posts
    Member since:
    Mar 2012

    Posted 15 Mar 2012 Link to this post

    Thanks. 

    This sounds great to me, because I'm about to use/buy your RadControls for WP later this year (or maybe sooner).
    And it would be great if I can use just Telerik's controls instead of combining them with my own LT-Helper class just when creating LiveTiles on background agent(s). Also, if you need some "advice/help" in this area do not hesitate to contact me.

  13. Todor
    Admin
    Todor avatar
    778 posts

    Posted 27 Mar 2012 Link to this post

    Hi all,

    Yes, you can update tiles in the background with LiveTileHelper.

    I have created a simple project, which illustrates how to use LiveTileHelper to update a SecondaryTile from a PeriodicTask.

    When the task is invoked you can update the tile, but you will have to use a Dispatcher in order to avoid UnauthorizedAccessException.

    Here are the steps to update the tile:
    1.       Run the application.
    2.       Tap on "create live tile", to create a new tile or update the existing one.
    3.       Check the checkbox to start the PeriodicTask.
    4.       You can go to your home screen and observe how the tile changes.

    Let me know if this is what you wanted to achieve.





    Sharpen your .NET Ninja skills
    ! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

  14. Radim
    Radim avatar
    6 posts
    Member since:
    Mar 2012

    Posted 27 Mar 2012 Link to this post

    Thanks!
Back to Top
DevCraft banner