This is a migrated thread and some comments may be shown as answers.

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

1 Answer 49 Views
Chart
This is a migrated thread and some comments may be shown as answers.
irem
Top achievements
Rank 1
irem asked on 31 Oct 2016, 11:48 AM

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?

 

 

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 03 Nov 2016, 07:46 AM
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
Tags
Chart
Asked by
irem
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or