Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Deletion of multiple nodes with a single confirmation message (Read 1687 times)
kausar
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 1
Joined: Jul 5th, 2012
Deletion of multiple nodes with a single confirmation message
Jul 5th, 2012 at 9:06am
Print Post  
When i delete multiple nodes i get confirmation message for each node instead i need to get a single messagebox and all the nodes should be deleted on ok
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Deletion of multiple nodes with a single confirmation message
Reply #1 - Jul 5th, 2012 at 9:26am
Print Post  
You could intercept the Delete command instead of showing confirmation dialog in the NodeDeleting handler:

Code
Select All
CommandManager.AddPreviewCanExecuteHandler(diagram, CanDelete);

void CanDelete(object sender, CanExecuteRoutedEventArgs e)
{
	if (e.Command == ApplicationCommands.Delete)
	{
		if (MessageBox.Show("you sure ...?",
			"...", MessageBoxButton.YesNo) == MessageBoxResult.No)
		{
			e.Handled = true;
			e.CanExecute = false;
		}
	}
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint