wp7:在页面 Loaded 事件中,bing 地图为空
我刚刚将 7.0 应用程序更新到 7.1,并且在 Bing 地图控件方面遇到了一个有趣的问题。
我试图在页面加载事件期间引用地图控件,但地图控件为空。
据我了解,当页面的 Loaded 事件发生时,页面上的所有控件也应该已加载。我还在加载事件中调用“ApplyTemplate()”以确保模板已加载。
我知道这个描述很简短,如果有帮助,我很乐意提供更多详细信息。
I just updated a 7.0 app to 7.1 and having an interesting issue with Bing Map control.
I am trying to reference the map control during the Page's Loaded event but the map control is null.
It is my understanding that by the time the Page's Loaded event occurs, all controls on the page should also have loaded. I also call 'ApplyTemplate()' in the loaded event to ensure that templates have been loaded.
I know this description is kind've brief and I'd be glad to supply more details if they would help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据页面的结构,在触发地图本身的
Loaded
事件之前,您不能依赖已加载的地图。Depending on the structure of your page, you can't rely on the map having been loaded until the
Loaded
event of the map itself has been fired.