How to rotate cube programmatically?

4 posts, 0 answers
  1. Manny
    Manny avatar
    13 posts
    Member since:
    Jan 2009

    Posted 20 Nov 2009 Link to this post

    I'm looking for a "Rotate" method in the cube so I can start / stop rotating from code-behind but can't find it. My solution is to set all automatic rotation off. Then I have "spinner" thread I create (it references internal classes from my proprietary Silverlight framework but hopefully you get the idea).

    Would be nice to have a "StartRotate() / StopRotate()" method that allowed rotation to be controlled from code. Or did I miss something *really* obvious??

    Attached the class for anyone interested...the thread class provides "runOneLoop" which is invoked every ThreadLoopSleep intervals. Starting / stopping the thread is handled in the base thread class. But it's easy enough to build these things just using CLR threads now...


        /// <summary>
        /// Spin the cube...
        /// </summary>
        internal class Spinner : Abr.CodeLibrary.Utils.Threading.BaseThread
          // from caller
          private System.Threading.SynchronizationContext _currentContext;
          private Telerik.Windows.Controls.RadCube _cube;
          private Abr.CodeLibrary.Utils.Logger.LoggerHolder _lh;

          /// <summary>
          /// Create object
          /// </summary>
          /// <param name="currentContext">UI context for updating</param>
          /// <param name="cube">The cube to spin</param>
          /// <param name="lh">Logging facilities</param>
          public Spinner(
            System.Threading.SynchronizationContext currentContext,
            Telerik.Windows.Controls.RadCube cube,
            Abr.CodeLibrary.Utils.Logger.LoggerHolder lh
            : base("Spinner", lh.LoggerOrNull)
            _currentContext = currentContext;
            _cube = cube;
            _lh = lh;

            // not sure about this
            this.ThreadLoopSleep = (int)(300 / _cube.RotateSpeed);
          } //ctor

          /// <summary>
          /// Start the spinning
          /// </summary>
          public void Start() {
            // start the spinner
            Abr.CodeLibrary.Utils.Threading.ThreadStartArgs tsa = new Abr.CodeLibrary.Utils.Threading.ThreadStartArgs();
          } //Start

          /// <summary>
          /// Run the spinner
          /// </summary>
          protected override void threadRunOneLoop()
              new System.Threading.SendOrPostCallback(
                delegate(object state)
                  if (_cube.SelectedIndex >= 5)
                    _cube.SelectedIndex = 0;
                    _cube.SelectedIndex += 1;
                  } //if
          } //threadRunOneLoop
        } //Spinner

  2. Bobi
    Bobi avatar
    513 posts

    Posted 23 Nov 2009 Link to this post

    Hi Manny,

    I'd like to apologize, but currently  RadCube does not currently expose any proper event/method/property for Start/Stop rotation or spinning. However, if there is enough demand for this functionality, we will definitely include it in our future releases of RadCube.
    Thank you for your feedback your Telerik points are updated.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Nic
    Nic avatar
    5 posts
    Member since:
    Jun 2010

    Posted 15 Jun 2010 Link to this post

    When will the next release be with the Rotation control functions?
  4. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 18 Jun 2010 Link to this post

    Hello Andre,

    Unfortunately, the implementation of such a rotation functionality of the RadCube isn't scheduled for now and I cannot bind to a specific date.

    All the best,
    Tina Stancheva
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top