When i delete a feature, I always ask our users if they are sure before I progress to delete or rollback in the OnRowDeleteEvent of my module.
<SPAN class="comment token">//OnRowDeleteEvent </SPAN>
<SPAN class="comment token">//PROCEED with the delete</SPAN>
args<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CancelEdit</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> Task<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FromResult</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">true</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//CANCEL the Delete</SPAN>
args<SPAN class="punctuation token">.</SPAN><SPAN class="token function">CancelEdit</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="operator token">=</SPAN><SPAN class="operator token">></SPAN> Task<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FromResult</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="keyword token">false</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
But now it seems that the progressor comes up after my message box has already been shown. My code is waiting for the result of the message box, so this "Deleting Selected Features" must be popping up on some type of out of the box code. Is there a way to suppress this Progressor or maybe I need to take another approach now?
Before

Now

<SPAN class="comment token">//My code waits for user response, but out of box progressor covers this up now</SPAN>
MessageBoxResult mbr <SPAN class="operator token">=</SPAN> ArcGIS<SPAN class="punctuation token">.</SPAN>Desktop<SPAN class="punctuation token">.</SPAN>Framework<SPAN class="punctuation token">.</SPAN>Dialogs<SPAN class="punctuation token">.</SPAN>MessageBox<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Show</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Are you sure you want to Delete this Feature?"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Confirm Delete"</SPAN><SPAN class="punctuation token">,</SPAN>
MessageBoxButton<SPAN class="punctuation token">.</SPAN>YesNo<SPAN class="punctuation token">,</SPAN> MessageBoxImage<SPAN class="punctuation token">.</SPAN>Warning<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">if</SPAN> <SPAN class="punctuation token">(</SPAN>mbr<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Equals</SPAN><SPAN class="punctuation token">(</SPAN>MessageBoxResult<SPAN class="punctuation token">.</SPAN>Yes<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>