xamarin/Xamarin.Forms

[Bug] Disappearing event behavior during backgrounding not consistent between the platforms.

オープン

#7,733 opened on 2019/09/29

 (8 件のコメント) (0 件のリアクション) (0 人の担当者)C# (1,926 件のフォーク)batch import
a/lifecycleeventshelp wantedp/Androidt/bug :bug:up-for-grabs

Repository metrics

Stars
 (5,644 個のスター)
PR merge metrics
 (30d に merged PR はありません)

説明

Description

I tried three methods to handle page Disapearing.

In the code

this.Disappearing += MainPage_Disappearing;

Overriding

protected override void OnDisappearing()
{
   Debug.WriteLine("OnDisappearing()");

   base.OnDisappearing();
}

And the event handler from XAML

private void ContentPage_Disappearing(object sender, EventArgs e)
{
    Debug.WriteLine("ContentPage_Disappearing()");
}

Neither of the three handler is called on UWP and WPF. They were called all three on Android.

Steps to Reproduce

Basicaly generate a new XF solution and implement the Disappearing handlers.

The test solution is attached.

XFBug_UWP_OnDisappearing.zip

コントリビューターガイド