Replacement for PanOffset?

2 posts, 0 answers
  1. Scott
    Scott avatar
    11 posts
    Member since:
    Oct 2012

    Posted 27 Jan 2015 Link to this post

    I've built several Windows Phone apps in the past, using your "UI For Windows Phone".  I use RadCartesianChart for my charts and DateTimeContinuous axis for my x-axis.  I always bind the charts dynamically (in my view model).  For pannable charts,  I've always set the PanOffset to the calculated width of my entire chart minus the plot width of the canvas.  

    Now I'm building a Windows Phone project using "UI For Windows Universal" and I've discovered that PanOffset is no longer a member of RadCartesianChart.  How do I handle panning now?  I've tried to set ScrollOffset to the fraction of the page that is not shown, but when I set ScrollOffset in my code, it doesn't retain the value to which I set it.  Can you point me to a link that explains the difference between panning in the old phone library and panning in the new library?
  2. Ves
    Ves avatar
    2870 posts

    Posted 30 Jan 2015 Link to this post

    Hi Scott,

    It is now ScrollOffset and it is somewhat different from PanOffset in WindowsPhone. It still follows the paradigm that in order to view the chart to the right, you actually "pan" it to the left, hence the negative X coordinate for the point. The change is that now these are units, which are relative to the viewport, e.g. (-1, 0) will scroll one viewport width. This way you will not need to calculate the width of the plot area. Instead, if you need to scroll the chart to the far right you can use new Point(Zoom.Width - 1, 0)

    Best regards,

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top