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

Binding ChartSelectionBehavior to MVVM Command

2 Answers 158 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Sarper
Top achievements
Rank 2
Sarper asked on 11 Jul 2012, 08:10 PM
Hi,

I have a question about that feature.  I am using MVVM commands to implement SelectionBehavior, but there is an error saying wrong syntax on that line.

<chart:RadPieChart.Behaviors>            
<telerik:ChartSelectionBehavior SelectionChanged=
"{Binding CategorySelectCommand}"/>          
</chart:RadPieChart.Behaviors>

Is there a way to bind it to a command?

Thank you.
Best Regards
Sarper

2 Answers, 1 is accepted

Sort by
0
Rosko
Telerik team
answered on 16 Jul 2012, 11:12 AM
Hello Sarper,

I regret to tell you that in the most general case it is not possible to bind an event to a command. There are different sources according to which there is a workaround this to be done. You can see for yourself over here: CodeProject and GeeksWithBlogs.

Greetings,
Rosko
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Sarper
Top achievements
Rank 2
answered on 16 Jul 2012, 11:18 AM
Hello Rosko,

I was looking for that case to your Code Library. And I found that project shows how to bind an event o a command.

http://www.telerik.com/community/code-library/silverlight/general/event-to-command-example.aspx

It is usefull, thank you for your assistance.
Sarper
Tags
ChartView
Asked by
Sarper
Top achievements
Rank 2
Answers by
Rosko
Telerik team
Sarper
Top achievements
Rank 2
Share this question
or