Customize Credential / Password Window When Synchronizing

1991
1
Jump to solution
06-30-2014 05:22 PM
HenryKo
New Contributor III
Hi,

We have a requirement to customize the credentials/username-password dialog when synchronizing back to secured map services, as we want to display better error messages if username-password is incorrect.

So... how do I firstly trap the error messages when user clicks on the "OK" button, and secondly how do I modify the displaying credentials window to change its title etc (see the attached screenshot)?

I know there is ESRI.ArcGIS.Mobile.Client.CredentialsRequiredCallback and ESRI.ArcGIS.Mobile.Client.Windows.UserCredentialsWindow but do not know how to use them.

I am using ArcGIS for Windows Mobile version 10.2.0.0 (build 3581).

Thanks.
0 Kudos
1 Solution

Accepted Solutions
HenryKo
New Contributor III
I got this working (hacking maybe?) by implementing a timer to poll for the current active foreground window, using P/Invoke. If the foreground window is type "ESRI.ArcGIS.Mobile.Client.Windows.UserCredentialsWindow", then grab the windows handle and cast it to the user credentials window. Then I could change its title, assign event handlers etc to it.

Good luck with anyone who might face similar problems...

View solution in original post

0 Kudos
1 Reply
HenryKo
New Contributor III
I got this working (hacking maybe?) by implementing a timer to poll for the current active foreground window, using P/Invoke. If the foreground window is type "ESRI.ArcGIS.Mobile.Client.Windows.UserCredentialsWindow", then grab the windows handle and cast it to the user credentials window. Then I could change its title, assign event handlers etc to it.

Good luck with anyone who might face similar problems...
0 Kudos