Hi,I am trying to add a close event to a command I have made for a Map web part in SharePoint.The command adds some graphics to the map and all I want to do is clear the graphics when the user clicks the 'X' button on the Command window.I have added an EventHandler to the ShowWindow method :MapApplication.Current.ShowWindow("Perform a search", gazSearch, false, DialogClosing, null, WindowType.Floating);
Then I have called my Reset function in the handler method:public event EventHandler<System.ComponentModel.CancelEventArgs> DialogClosing; protected virtual void OnDialogClosing2(object sender, System.ComponentModel.CancelEventArgs args) { if (DialogClosing2 != null) { DialogClosing2(this, args); gazSearch.reset(); } }
But no matter what I have tried I have not been able to get the event to fire.Can somebody tell me what I am doing wrong.Thanks