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

Staggering SlideHubTile

5 Answers 54 Views
HubTile
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Miron
Top achievements
Rank 1
Miron asked on 16 Jan 2013, 08:06 AM
Hi there,

I currently have two rows of 4 SlideHubTiles. They look great, except that all the slides happen in unison. This looks very weird, so I'm wondering what the recommended way is to stagger them so that they all slide at different, seemingly random, times?

Thanks!

5 Answers, 1 is accepted

Sort by
0
Victor
Telerik team
answered on 16 Jan 2013, 09:01 AM
Hi Miron,

Thanks for writing.
You have to set the UpdateInterval property of the tiles to different values. You can do that easily with the Random class.

Greetings,
Victor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Miron
Top achievements
Rank 1
answered on 16 Jan 2013, 04:14 PM
Hey,

Won't that result in the various tiles updating at different rates? I was thinking I could use the IsFrozen property somehow, in conjunction with a background thread that loops through all the tiles, unfreezing them at random intervals.

Essentially, the effect I'm going for is I want the phase of each tile to be different, not its frequency.
0
Victor
Telerik team
answered on 17 Jan 2013, 08:27 AM
Hi Miron,

Thanks for writing.
Setting IsFrozen property randomly will change the frequency of the updates. If you generate random update intervals the effect will be the same. The animations themselves will not change speed, only the transitions from state to state will change frequency.

If you want the tiles to update at the exact same time, but have different states displayed, you should simply unfreeze the tiles, one by one, at each update interval step. You can do so with DispatcherTimer for example.

Regards,
Victor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
0
Miron
Top achievements
Rank 1
answered on 18 Jan 2013, 05:55 AM
Thanks!

Is there a way to know what the tile is currently displaying? What I'm doing is basically picking a random tile and unfreezing it. I want to freeze it again once it has done one loop through all the slides. Then I can pick another random one to unfreeze and so forth.
0
Victor
Telerik team
answered on 18 Jan 2013, 08:48 AM
Hello Miron,

Thanks for writing.
I am afraid that the hub tiles do not expose details about their visual states. You can inherit from the tile you are using and gain access to its states enumerator. It will provide the current state of the tile.

All the best,
Victor
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
HubTile
Asked by
Miron
Top achievements
Rank 1
Answers by
Victor
Telerik team
Miron
Top achievements
Rank 1
Share this question
or