private void Dataset_NetworkLinkControlMessage(object sender, KmlNetworkLinkControlMessageEventArgs e) { // Due to the nature of the threading implementation, // the dispatcher needs to be used to interact with the UI. // The dispatcher takes an Action, provided here as a lambda function. Device.BeginInvokeOnMainThread(async() => { await((Page)Parent).DisplayAlert("KML layer message", e.Message, "OK"); }); }
private async void Dataset_NetworkLinkControlMessage(object sender, KmlNetworkLinkControlMessageEventArgs e) { // Due to the nature of the threading implementation, // the dispatcher needs to be used to interact with the UI. // The dispatcher takes an Action, provided here as a lambda function. await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, async() => { await new MessageDialog(e.Message, "KML layer message").ShowAsync(); }); }
private void Dataset_NetworkLinkControlMessage(object sender, KmlNetworkLinkControlMessageEventArgs e) { // Due to the nature of the threading implementation, // the dispatcher needs to be used to interact with the UI. // The dispatcher takes an Action, provided here as a lambda function. DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, () => { _ = new MessageDialog2(e.Message, "KML layer message").ShowAsync(); }); }
private void Dataset_NetworkLinkControlMessage(object sender, KmlNetworkLinkControlMessageEventArgs e) { // Due to the nature of the threading implementation, // the dispatcher needs to be used to interact with the UI. // The dispatcher takes an Action, provided here as a lambda function. InvokeOnMainThread(() => { // Display the message to the user. UIAlertView alertView = new UIAlertView("KML layer message", e.Message, (IUIAlertViewDelegate)null, "OK", null); alertView.Show(); }); }
private void Dataset_NetworkLinkControlMessage(object sender, KmlNetworkLinkControlMessageEventArgs e) { // Due to the nature of the threading implementation, // the dispatcher needs to be used to interact with the UI. // The dispatcher takes an Action, provided here as a lambda function. RunOnUiThread(() => { // Display the message to the user. AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.SetMessage(e.Message).SetTitle("KML layer message").Show(); }); }
private void Dataset_NetworkLinkControlMessage(object sender, KmlNetworkLinkControlMessageEventArgs e) { MessageBox.Show(e.Message, "KML layer message"); }