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

The "Me" tile

12 Answers 127 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.
ManniAT
Top achievements
Rank 2
ManniAT asked on 23 Feb 2012, 11:37 AM
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

12 Answers, 1 is accepted

Sort by
0
Valentin.Stoychev
Telerik team
answered on 24 Feb 2012, 09:28 AM
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 >>
0
ManniAT
Top achievements
Rank 2
answered on 24 Feb 2012, 10:53 AM
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
0
Valentin.Stoychev
Telerik team
answered on 24 Feb 2012, 11:02 AM
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 >>
0
ManniAT
Top achievements
Rank 2
answered on 24 Feb 2012, 11:09 AM
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
0
Accepted
Valentin.Stoychev
Telerik team
answered on 24 Feb 2012, 01:10 PM
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 >>
0
Radim
Top achievements
Rank 2
answered on 14 Mar 2012, 06:20 PM

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.



 
0
Valentin.Stoychev
Telerik team
answered on 15 Mar 2012, 08:49 AM
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 >>
0
Radim
Top achievements
Rank 2
answered on 15 Mar 2012, 09:49 AM
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);
...

0
Valentin.Stoychev
Telerik team
answered on 15 Mar 2012, 10:00 AM
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 >>
0
Radim
Top achievements
Rank 2
answered on 15 Mar 2012, 10:11 AM
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.

0
Todor
Telerik team
answered on 27 Mar 2012, 09:23 AM

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

0
Radim
Top achievements
Rank 2
answered on 27 Mar 2012, 10:16 AM
Thanks!
Tags
LiveTileHelper
Asked by
ManniAT
Top achievements
Rank 2
Answers by
Valentin.Stoychev
Telerik team
ManniAT
Top achievements
Rank 2
Radim
Top achievements
Rank 2
Todor
Telerik team
Share this question
or