When adapter.DeviceConnectionLost happens (for instance when I shut dowm my ble peripheral) MyPage closes correctly.
The second time I open MyPage if DeviceConnectionLost event happens then I get an Unhandled Exception, cause I guess PopAsync is reached twice. It seems that second PopAsync() generates the exception.

I have checked that if MyPage is loaded three times for example, ConnectionLost event will be executed three times, as I can see "LOST CONNECTION." text in my debug output window.

Is there any way to erase past events of MyPage after doing PopAsync ? How could I resolve this issue ?

Answers

@asierdo Note that such inline deligates are the main source of memory leaks which lead to instability. Though they are very easy to code, especially when they are short, not preferred. Otherwise, wherever you do a PopAsync(), the protected override event OnDisappearing() will occur.