[英]xamarin.forms googlemaps infowindow click open new page
in my Xamarin.Forms App I have an Page which indicates an GoogleMap. 在我的Xamarin.Forms应用程序中,有一个页面指示GoogleMap。 Everything is working perfect, but when I click on an InfowWindow from a pin, i cant open a new detailpage.
一切工作正常,但是当我从别针上单击InfowWindow时,我无法打开新的detailpage。 The App hangs and I can do nothing with the App.
应用程序挂起,我无法使用该应用程序。 I get no error message.
我没有收到错误消息。
But its working in iOS. 但它可以在iOS中使用。
Heres the Code: 继承人代码:
private void MapObjekt_InfoWindowClicked(object sender, InfoWindowClickedEventArgs e)
{
App.locator.StopListeningAsync();
App.locator.PositionChanged -= Locator_PositionChanged;
objektliste detailPage = new objektliste();
App.mdp.Detail = detailPage;
}
Whats my fault ? 我怎么了
问题是,我必须像这样在Mainthread中打开Page:
Device.BeginInvokeOnMainThread(() => { App.mdp.Detail = detailPage; });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.