PrepAway - Latest Free Exam Questions & Answers

Which code segment should you use?

You are designing a Windows Phone 7 application that consists of a single XAML page. A rectangle that is hidden within the page appears as a result of a user action. You need to ensure that the rectangle is hidden and the application remains open when the user presses the Back key. Which code segment should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
Protected Overrides Sub OnBackKeyPress(
ByVal e As System.ComponentModel.CancelEventArgs)
If popUp.Visibility =
System.Windows.Visibility.Visible Then

B.
Cancel = True
popUp.Visibility = System.Windows.Visibility.Collapsed End If
End Sub

C.
Sub NavigationService_Navigating(ByVal sender As Object, ByVal e As NavigatingCancelEventArgs)
If (e.NavigationMode = NavigationMode.Back) Then

D.
Cancel = True
popUp.Visibility = System.Windows.Visibility.Collapsed End If
End Sub

E.
Protected Overrides Sub OnNavigatingFrom(
ByVal e As NavigatingCancelEventArgs)
MyBase.OnNavigatingFrom(e)

F.
Cancel = True
popUp.Visibility = System.Windows.Visibility.Collapsed End Sub

G.
Protected Overrides Sub OnNavigatedFrom(
ByVal e As NavigationEventArgs)
MyBase.OnNavigatedFrom(e)
popUp.Visibility = System.Windows.Visibility.Collapsed End Sub


Leave a Reply