question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How given sample works for ReverseInit?

See original GitHub issue

In the sample page there is reverseInit as below. as far as I know reverseInit is only called when we use poppagemodel with data. Should we do poppage everytime when back button is clicked? How can this be handled sofware backbutton?

    //This is called when a pushed Page returns to this Page
    public override void ReverseInit (object value)
    {
        var newContact = value as Quote;
        if (!Quotes.Contains (newContact)) {
            Quotes.Add (newContact);
        }
    }

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
stevechadbournecommented, Feb 25, 2020

I think it should always be called. I have been caught out by this twice now (shame on me!) and had to find this issue to realise why it was not being called.

0reactions
djunodcommented, Dec 31, 2020

Figured it out after looking at your source…

protected override async void ViewIsDisappearing(object sender, EventArgs e)
{
    base.ViewIsDisappearing(sender, e);
    if (PreviousPageModel != null)
    {
        var dict = new Dictionary<string, string>
        {
            ["Project"] = Settings.SelectedProjectName,
            ["App"] = Constants.AppAsphalt,
            ["Lot"] = Lot.AsphaltLotID,
            ["Action"] = "Add",
        };
        PreviousPageModel.ReverseInit(dict);
    }
}
Read more comments on GitHub >

github_iconTop Results From Across the Web

FreshMvvm Quick Start Guide - Michael Ridland
Step 2. Obtain FreshMvvm from Nuget. Obtain FreshMvvm from Nuget by searching for FreshMvvm, make sure to do this on your Xamarin.Forms PCL ......
Read more >
FreshMvvm for Xamarin.Forms
FreshMvvm is a super light Mvvm Framework designed specifically for Xamarin.Forms. It's designed to be Easy, Simple and Flexible.
Read more >
FreshMvvm - A Mvvm Framework designed for Xamarin.Forms
Basic methods on PageModel (init, reverseinit). Built in IOC Container. PageModel Constructor Injection. Basic methods available in Model, like ...
Read more >
Xamarin.Forms MVVM Made Easy with FreshMvvm Framework
... server: https://discord.gg/2cAyTGNHBD Links Sample code repo: ... MVVM without a framework 15:07 - Implement MVVM with FreshMvvm ...
Read more >
MVVM Databinding In Xamarin.Forms Using Fresh MVVM
In this tutorial, we will learn how to perform MVVM approach in Xamarin.Forms using Fresh MVVM.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found