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.

No command binding for DiagramMenuItem - what is a MVVM-workaround?

Thread ID:

Created:

Updated:

Platform:

Replies:

127485 Nov 18,2016 06:17 AM Nov 29,2016 01:04 AM WPF 5
loading
Tags: SfDiagram
Artemy
Asked On November 18, 2016 06:17 AM

Hello.

Needed to set node's context menu with menu items for some custom parameterized by the node itself. Using binding this task easily solves via specifying the parameter as menu's PlacementTarget. But DiagramMenuItem's Command and CommandParameter does not support binding (unlike the standard MenuItem's ones). So what is a best way to solve the problem and not violate the MVVM pattern (commands are, as usual, defined in the VM)?

Keerthivasan Ramamoorthy [Syncfusion]
Replied On November 22, 2016 05:48 AM

Hi Artemy,   
  
Requirement: “DiagramMenuItem's Command and CommandParameter Binding support”.  
  
We don’t have a support to achieve your requirement. We will implement and include the requested feature in our Volume 1, 2017 release which is tentatively scheduled to be rolled out by the first week of February,2017.  
  
Regards,   
Keerthivasan R. 
 


Artemy
Replied On November 25, 2016 04:05 AM

Thanks for the reply. It's nice that the feature planned to be added. However for now I figured out that can use classic ContextMenu via ContextMenu property, iherited from FrameworkElement.

Suresh Shanmugam [Syncfusion]
Replied On November 28, 2016 07:55 AM

Hi Artemy, 
Thanks for the update. 
 
Could you please let us know whether you have used classic (Diagram Control) context menu or Framework context menu. This helps us to serve you better. 
 
 
Regards, 
Suresh Shanmugam 
 


Artemy
Replied On November 28, 2016 09:08 AM

Hi Artemy, 
Thanks for the update. 
 
Could you please let us know whether you have used classic (Diagram Control) context menu or Framework context menu. This helps us to serve you better. 
 
 
Regards, 
Suresh Shanmugam 
 


Hello, Suresh Shanmugam.

I use standard FrameWorkElement's  ContextMenu. Have no issues with it for now.

Keerthivasan Ramamoorthy [Syncfusion]
Replied On November 29, 2016 01:04 AM

Hi Artemy, 
Thanks for the update. 
We are glad that you have fixed your issue. Please let us know if you need any other assistance.  
  
Regards,  
Keerthivasan R.  


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.

;