We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Custom context menu binding to ChartAreaCommands

Thread ID:





96439 Sep 14,2010 09:42 AM UTC Oct 14,2010 01:17 PM UTC WPF 3
Tags: Chart
Willem Kaal
Asked On September 14, 2010 09:42 AM UTC

How should I bind a context menu item in a chart area to one of the ChartAreaCommands?

Please find attached a sample project. The problem is that my menu item 'Zoom in' remains disabled.

Thanks in advance,


Sujitha S [Syncfusion]
Replied On September 27, 2010 08:25 AM UTC

Hi Wk,

Sorry for delaying the udpate.

CommandBinding inside the context menu is possible only if we give focus to the Menu Item.

I have added the link about the command binding inside the context menu for your reference.


I have also created a simple sample, Please find the attached sample.

Sujitha S


Willem Kaal
Replied On October 8, 2010 02:33 PM UTC

Hi Sujitha,
Thank you for your answer.
However, in the given example, I'd expected the ZoomIn command (static in ChartAreaCommands) to handle the zooming.
In the example, the method CommandBinding_Executed (in code behind) handles it...

I am trying to get the ChartAreaCommand.ZoomIn command to do the work, without the need to write any code behind myself.
Maybe it is my misunderstanding of how to use the ZoomIn static command?


Sujitha S [Syncfusion]
Replied On October 14, 2010 01:17 PM UTC

Hi Wk,

Thanks for your interest in Syncfusion product.

CommandBinding inside the ContextMenu item is possile only if we give focus to the Menu item.

So, I have used the alternative way of CommandBinding_Executed method to achieve your reuqirement.

Let me know, if you have any queries.

Sujitha S


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon