Staggering SlideHubTile

6 posts, 0 answers
  1. Miron
    Miron avatar
    4 posts
    Member since:
    Dec 2012

    Posted 16 Jan 2013 Link to this post

    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!
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 16 Jan 2013 Link to this post

    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.
  3. DevCraft banner
  4. Miron
    Miron avatar
    4 posts
    Member since:
    Dec 2012

    Posted 16 Jan 2013 Link to this post

    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.
  5. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 17 Jan 2013 Link to this post

    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.
  6. Miron
    Miron avatar
    4 posts
    Member since:
    Dec 2012

    Posted 17 Jan 2013 Link to this post

    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.
  7. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 18 Jan 2013 Link to this post

    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.
Back to Top
DevCraft banner