Hi Jennifer
Sorry, If I did not explain my problem well.
The below(your) code worked well and it stopped the split line
your Code:
if(editor.CancelActive.CanExecute(null))
editor.CancelActive.Execute(null);
But now It disables the split button it self.It does not enabled until I split that polygon.
I explained my problem in steps below.
What I do is.
1) I select the polygon before doing the split command
2) I click on split button command with has (editor.cut in it), which is below method
private void CutHyperlinkButton_Click(object sender, RoutedEventArgs e)
{
CutHyperlinkButton.Command = editor.Cut;
///do something here
}
3) Next I dont draw the split line.
4) I hit on the SaveChanges Button. (code of it below)
private void SaveSplitHyperlinkButton_Click(object sender, RoutedEventArgs e)
{
//I copied your lines of code here
if(editor.CancelActive.CanExecute(null))
editor.CancelActive.Execute(null);
//here I unselect the graphic
}
Note: This worked well it disabled the split line
5) After this I observed that the
SaveSplitHyperlinkButton is disabled.
6) I observed that it gets enabled only when I select the same polygon back again, and if I split that one again. Then only the button gets enabled for splitting other polygons.
Cannot figure why the split command remebers the selected polygon to be split.
Is there any way, I can enable the SaveSplitHyperlinkButton back again with code.
Thanks for the help.
Muralidhar Moka