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.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM058647
已提交
June 29, 2010
上次修改时间
April 2, 2025
适用范围
No Product Found
找到的版本
10.0
修正版本
10.1
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
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; }