更新时间:2023-12-06 12:15:40
该行:
this.AddHandler(UIElement.TappedEvent, new TappedEventHandler(Page02_CloseButtonTapped), true);
将MainPage的轻击事件与Page02_CloseButtonTapped方法相关联.因此,任何点击事件都会触发该方法.
is associating the tapped event of the MainPage to Page02_CloseButtonTapped method. So any tap event on it will fire the method.
我假设您打算将其附加到Page02控件的CloseButtonTapped事件上?
I'm assuming you meant to attach it to the CloseButtonTapped event on the Page02 control instead?