I'm tryi开发者_开发知识库ng to override some page events for wp7, but have no luck. I tryed to override OnFocus, OnNavigatedTo like this:
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
{
base.OnNavigatedTo(e);
Debug.WriteLine("NavigatedTo");
}
The code you've posted works fine. What issue are you having?
There is no OnFocus()
event. There are OnGotFocus()
and OnLostFocus()
events exposed due to the pages inheritence from Control
. Note that the page can only receive focus when you explicitly set it in code. But, these events will also be triggered through event bubbling from child controls on the page.
I had a CTP version of WP7 SDK, that was a problem
精彩评论