public static void ShowInDialog(PositionChooserDialogPageArgs args, Action<BasicGeoposition> finishedAction) {
            var dialog = new ContentDialog() {
                Template = Application.Current.Resources["MyContentDialogControlTemplate"] as ControlTemplate,
                RequestedTheme = ElementTheme.Light
            };
            dialog.Padding = new Thickness(-10, -10, -10, -10);
            dialog.BorderThickness = new Thickness(0, 0, 0, 0);

            var frame = new Frame();
            frame.Navigate(typeof(PositionChooserDialogPage), args);
            var page = frame.Content as PositionChooserDialogPage;
            dialog.Content = frame;

            dialog.PrimaryButtonText = "SAVE".t(R.File.NODE);
            dialog.PrimaryButtonClick += (d, _) => {
                finishedAction?.Invoke(page.mapControl.Center.Position);
            };
            dialog.ShowAsync().Forget();
        }
        private void positionTextBox_Tapped(object sender, TappedRoutedEventArgs e) {

            PositionChooserDialogPageArgs args = null;
            if (position != null) {
                args = new PositionChooserDialogPageArgs {
                    lat = position.Value.Latitude,
                    lon = position.Value.Longitude
                };
            }

            PositionChooserDialogPage.ShowInDialog(args, (position) => {
                this.position = position;
                positionTextBox.Text = String.Format("POSITION".t(R.File.NODE), position.Latitude, position.Longitude);
            });
        }