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.
Unfortunately, activation email could not send to your email. Please try again.

Custom context menu binding to ChartAreaCommands

Thread ID:

Created:

Updated:

Platform:

Replies:

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

Hi,
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,
wk



SyncFusionChartContextMenu_c7e93b34.zip

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

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.

http://stackoverflow.com/questions/911904/commandbinding-in-window-doesnt-catch-execution-of-command-from-contextmenu

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

Regards
Sujitha S





20100518_ChartFull_23248889.zip

Willem Kaal
Replied On October 8, 2010 10:33 AM

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?

Regards,
Wk



Sujitha S [Syncfusion]
Replied On October 14, 2010 09:17 AM

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.

Regards,
Sujitha S


CONFIRMATION

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.

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.

;