Is there any way to access a control (chart) within ControlTemplate?

2 posts, 0 answers
  1. irem
    irem avatar
    4 posts
    Member since:
    Oct 2016

    Posted 31 Oct Link to this post

    Hi,

    I am using Telerik RadCartesianChart for Xamarin Forms. And I need to add annotation to this chart. 

    I have placed the RadCartesianChart in a control template and I would like to bind several annotations.

    According to Annotations document, I can add annotations from only code behind like this: 

    "this.myChart.Annotations.Add(lineAnnotation);"

     

    I think, there are 2 options for me:

    1 - Find a way to use annotation binding from xaml instead of code behind.

    2 - Find a way to access telerik chart which is in the control template, from code behind.

     

    Could you please help me?

     

     

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 03 Nov Link to this post

    Hi irem,

    You can use a behavior to access the chart in code. Please give this approach a try on your end and let us know if it works for you.

    Regards,
    Pavel R. Pavlov
    Telerik by Progress
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top