예제 #1
0
        //Handle the close button clicked event
        private async void CloseButton_Clicked(object sender, EventArgs e)
        {
            await RootContent.FadeTo(0, 125); //Makes the RootContent of the current page fade out in 125 ms

            await Finder.TranslateTo(0, 400, 200);

            Current.FV.Children[0] = new MainView(); //Changes the value of the grid FV to the new MainView page

            Current.UpdateCamera = true;
            Position LocationUser = new Position(Current.CU.Latitude, Current.CU.Longitude);
            await Current.CustomMap.AnimateCamera(CameraUpdateFactory.NewPositionZoom(LocationUser, 17.5), TimeSpan.FromSeconds(2.5));
        }
        private async void CloseButton_Clicked(object sender, EventArgs e)
        {
            await RootContent.FadeTo(0, 125); //Makes the RootContent of the current page fade out in 125 ms

            await Finder.TranslateTo(0, 400, 200);

            Current.FV.Children[0] = new RouteView();                                                                                  //Changes the value of the grid FV to the new RouteView page

            Current.UpdateCamera = false;                                                                                              //Prevents the camera from updating when the postion changes
            Position LocationUser = new Position(Current.SelectedItem.Latitude, Current.SelectedItem.Longitude);
            await Current.CustomMap.AnimateCamera(CameraUpdateFactory.NewPositionZoom(LocationUser, 17.5), TimeSpan.FromSeconds(2.5)); //Animate the camera of the map to the selected position with a zoom of 17.5 and in a timespan of 2.5 seconds
        }