Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagramming - How do I edit context menu? (Read 2072 times)
Mandy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Diagramming - How do I edit context menu?
Jun 3rd, 2020 at 8:56am
Print Post  
Hello,

a)Is there possible to custom context menu when node long pressed?

b)Is there possible to popup dialog when click edit / delete icon?

Thanks!
  

contextmenu.png ( 44 KB | 165 Downloads )
contextmenu.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming - How do I edit context menu?
Reply #1 - Jun 3rd, 2020 at 12:29pm
Print Post  
Hi,

You can subscribe to the Diagram.RadialMenuCreated event and obtain a reference to the context menu via the RadialMenuEventArgs.Menu object or via the Diagram.Menu property. Having that you can modify the existing menu items in the RadialMenu.Children collection or add new IMenuItem instances with the RadialMenu.AddMenuItem method.

The IMenuItem interface provides a Clicked event that is raised when a menu item is clicked. You can show your custom popup from a handler to that event.

Regards,
Lyubo
MindFusion
  
Back to top
 
IP Logged
 
Mandy
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 46
Joined: Jun 3rd, 2020
Re: Diagramming - How do I edit context menu?
Reply #2 - Jun 4th, 2020 at 7:21am
Print Post  
Hi Lyubo,

Thanks for your reply.

I got an exception 'System.ObjectDisposedException: Cannot access a disposed object.' from RadialMenu.AddMenuItem method.

Please advise what I did wrong and what I can do to make it work.

  

aaa.png ( 42 KB | 166 Downloads )
aaa.png
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Diagramming - How do I edit context menu?
Reply #3 - Jun 4th, 2020 at 8:20am
Print Post  
Hi,

You can't remove children from the menu collection at the time being - you can only modify the existing items or add new ones. We'll try to add this functionality in a future release.

Regards,
Lyubo
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint