Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

PopAsync to close app

$
0
0

From clicking on a push notification I open a page to display more data and also do actions, when a button is pressed to do an action and the action is completed I want this page to be closed

    private async void BtnFinnish_OnClicked(object sender, EventArgs e)
    {
        var employeeId = GlobalAccess.LoggedIn.EmployeeID;
        var companyId = GlobalAccess.LoggedIn.CompanyID;
        var resutl = await GlobalAccess.Workplay.FinalReviewFinnish(employeeId, companyId, _milestonePlanningId).AsyncExecute<bool>();
        await Navigation.PopAsync();
    }

Now the problem with the above code is that Neither PopAsync and PopModalAsync are working the page is still open

Here is my Application Code

public class AssyncApp : Application
{
    public AssyncApp(string data, string action)
    {
        switch (action)
        {
            case "ViewNote":
                MainPage = new NavigationPage(new ViewNote(data));
                break;
            case "MeetingRequest":
                MainPage = new NavigationPage(new ViewMeetingAccept(data));
                break;
            case "FinalReview":
                MainPage = new NavigationPage(new ViewFinalReview(data));
                break;
        }
    }
}

The button click is currently in the ViewFinalReview page


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>