Пример #1
0
 private async void Pin_MarkerClicked(object sender, PinClickedEventArgs e)
 {
     Pin buf = sender as Pin;
     ConnectionWithDataBase db = Search(buf);
     string     s          = $"https://archi.ru/projects/world/{db.index}";
     Obj        obj1       = new Obj(s, buf, db.image);
     DetailPage detailPage = new DetailPage(obj1);
     //detailPage.BindingContext = obj1;
     await Navigation.PushModalAsync(detailPage);
 }
        public MainPageViewModel()
        {
            Notes = new ObservableCollection <string>();

            SelectedNoteChangedCommand = new Command(async() =>
            {
                var detailVM              = new DetailPageViewModel(SelectedNote);
                var detailPage            = new DetailPage();
                detailPage.BindingContext = detailVM;

                await Application.Current.MainPage.Navigation.PushModalAsync(detailPage);
            });

            EraseCommand = new Command(() => TheNote = string.Empty);

            SaveCommand = new Command(() =>
            {
                Notes.Add(TheNote);

                TheNote = string.Empty;
            });
        }