Binding ChartSelectionBehavior to MVVM Command

3 posts, 0 answers
  1. Sarper
    Sarper avatar
    22 posts
    Member since:
    Aug 2012

    Posted 11 Jul 2012 Link to this post

    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. Rosko
    Admin
    Rosko avatar
    137 posts

    Posted 16 Jul 2012 Link to this post

    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.

  3. DevCraft banner
  4. Sarper
    Sarper avatar
    22 posts
    Member since:
    Aug 2012

    Posted 16 Jul 2012 Link to this post

    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
Back to Top