开发者

Override page events

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜