Compas + radialGauge + WP7

5 posts, 1 answers
  1. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 18 Sep 2012 Link to this post

     

      .... 


    How to set compas offset of angle +-(90), look image.
    Zero value must be on the top of RadialGauge. How to do that?

    At this point I hide labels and at runtime add +90 degrees.

    <gauges:RadialGaugeRange TickStep="45"
                                     LabelStep="45"
                                     MinAngle="0"
                                     MaxAngle="359"                               
                                     MinValue="0"                                
                                     MaxValue="359"
                                      
                                     TickRadiusScale="1"
                                     LabelRadiusScale="0.50"
                                      
                                    />



    ...
  2. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 19 Sep 2012 Link to this post

    Hi Pet,

    You just need to work with the min/max angle properties. In your case, the MinAngle must be 90 and the MaxAngle must be 359 + 90.

    Regards,
    Victor
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. DevCraft banner
  4. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 19 Sep 2012 Link to this post

     if i want to set compass to 10 degree(out of diapason)? What value will show array on compass?

    Compass diapason(valid interval) is from 1 to 360 degrees. 

    Problem is when degree value is out of diapason. When this happen compass array "dance crazy" and at the end stop to zero default value. This is wrong behavior for compass, but maybe correct for gauge ;)

    In silverlight when value is out of interval, array revert and stop to correct value, in wp7 array revert( "dance crazy" ) and stop to zero- wrong value!

  5. Answer
    Victor
    Admin
    Victor avatar
    1351 posts

    Posted 25 Sep 2012 Link to this post

    Hi Pet,

    Thanks for the question.
    Please clarify what you mean by "out of diapason". Also what "array" are you referring to, is it the gauge range?
    I am looking forward to your reply. 

    Regards,
    Victor
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  6. kity
    kity avatar
    71 posts
    Member since:
    Mar 2012

    Posted 25 Sep 2012 Link to this post

    In teleric wp7 library must manually write function for calculation degree value

    1 step. convert value to degree

    2. if value is out of degree compass diapason must use this formula

       x =  Truncate (d / 360.0); // x is type of integer, numbers of reverts, truncate() is missing in WP sdk 7.1, must manually write (usee floore combination)

       d2 = x * d;

       d = Abs(d-d2);

Back to Top
DevCraft banner