The ArcGIS Mobile walk through for creating a first project extension returns the error "the calling thread must be STA, because many UI components require this" when creating a new MenuItem object.
Last Published: August 25, 2014No Product Found
Bug ID Number
NIM058647
Submitted
June 29, 2010
Last Modified
April 2, 2025
Applies to
No Product Found
Version found
10.0
Version Fixed
10.1
Status
Fixed
The bug has been fixed. See the Version Fixed and Additional Information, if applicable, for more information.
Workaround
Add the following line above the System.Windows.Controls.MenuItem ami = new System.Windows.Controls.MenuItem();if (!MobileApplication.Current.Dispatcher.CheckAccess()) { MobileApplication.Current.Dispatcher.BeginInvoke((System.Threading.ThreadStart)delegate() { Initialize(); }); return; }