Hello,
if I override the functions "CommitAsync()" and "CancelAsync()" from the class "ArcGIS.Desktop.Framework.Contracts.Page" the functions are not called when I press OK or Cancel in the GUI. Can anybody confirm this bug or am I doing something wrong?
<SPAN class="keyword token">public</SPAN> <SPAN class="keyword token">class</SPAN> <SPAN class="token class-name">ProApplicationSettingsViewModel</SPAN> <SPAN class="punctuation token">:</SPAN> Page
<SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">/// <summary></SPAN>
<SPAN class="comment token">/// Invoked when the OK or apply button on the property sheet has been clicked.</SPAN>
<SPAN class="comment token">/// </summary></SPAN>
<SPAN class="comment token">/// <returns>A task that represents the work queued to execute in the ThreadPool.</returns></SPAN>
<SPAN class="comment token">/// <remarks>This function is only called if the page has set its IsModified flag to true.</remarks></SPAN>
<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> Task <SPAN class="token function">CommitAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<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">"OK clicked."</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">return</SPAN> Task<SPAN class="punctuation token">.</SPAN><SPAN class="token function">FromResult</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> Task <SPAN class="token function">ResetAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</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="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> Task <SPAN class="token function">CancelAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</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">/// <summary></SPAN>
<SPAN class="comment token">/// Called when the page loads because to has become visible.</SPAN>
<SPAN class="comment token">/// </summary></SPAN>
<SPAN class="comment token">/// <returns>A task that represents the work queued to execute in the ThreadPool.</returns></SPAN>
<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> Task <SPAN class="token function">InitializeAsync</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">return</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">/// <summary></SPAN>
<SPAN class="comment token">/// Called when the page is destroyed.</SPAN>
<SPAN class="comment token">/// </summary></SPAN>
<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">override</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">Uninitialize</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</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></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>InitializeAsync() and Uninitialize() are working fine.
Thank you for your help.
Best regards.