Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何阻止返回按钮?_C#_Silverlight_Windows Phone 7_Silverlight 4.0_Silverlight 3.0 - Fatal编程技术网

C# 如何阻止返回按钮?

C# 如何阻止返回按钮?,c#,silverlight,windows-phone-7,silverlight-4.0,silverlight-3.0,C#,Silverlight,Windows Phone 7,Silverlight 4.0,Silverlight 3.0,我需要阻止返回按钮 private void MainPage_BackKeyPress(object sender, CancelEventArgs e) { //? } 然后我需要解锁它。如何实现此功能?要防止“后退”按钮实际返回,只需取消事件: e.Cancel = true;

我需要阻止返回按钮

private void MainPage_BackKeyPress(object sender, CancelEventArgs e)
{ 
    //?
}

然后我需要解锁它。如何实现此功能?

要防止“后退”按钮实际返回,只需取消事件:

e.Cancel = true;