是否可以通过其他方法制作 Windows Phone 8 后退按钮事件(OnBackKeyPress)?我一直在尝试从外部按钮单击或页面初始化程序调用该事件。但它给出了一个错误?
OnBackKeyPress += new EventHandler<System.ComponentModel.CancelEventArgs>(OnBackKeyPress);
No overload for 'OnBackKeyPress' matches delegate 'System.EventHandler'
最佳答案
像下面这样重写后退键按下事件,
protected override void OnBackKeyPress(System.ComponentModel.CancelEventArgs e)
{
//Do your work here
base.OnBackKeyPress(e);
}
关于c# - Windows Phone 8 后退按钮事件 (OnBackKeyPress) 处理?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19239497/