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

Is the call to base.OnAppearing() necessary when inheriting from ContentPage?

$
0
0

Looking at the source from Xamarin.Forms.Page:

protected virtual void OnAppearing()
{
}

I'm curious if the call to base.OnAppearing() is necessary when inheriting from ContentPage? Example:

public class MyPage : ContentPage
{
    protected override void OnAppearing()
    {
        // make a call to the base, that does nothing for now
        base.OnAppearing();
        // ...
    }
}

Is this protected virtual method likely to change in the future and should I just follow the docs and include the call to the base when overriding?

To be clear, I understand that it is necessary to call base.OnAppearing() if I wish to override this method when inheriting from Xamarin.Forms.MasterDetailPage.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



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