protected override void OnWindowCreated(WindowCreatedEventArgs args)
{
// Register QuerySubmitted handler for the window at window creation time and only registered once
// so that the app can receive user queries at any time.
SearchPane.GetForCurrentView().QuerySubmitted += new TypedEventHandler<SearchPane, SearchPaneQuerySubmittedEventArgs>(OnQuerySubmitted);
}
似乎无法覆盖 onWindowCreated 我什至没有在 App.xaml.cs 的覆盖智能感知上看到它。我在这里错过了什么吗?我下载了一个示例搜索契约(Contract)应用程序。有人知道我错过了什么吗?
连这部分都不见了
SearchPane.GetForCurrentView().ShowOnKeyboardInput = true;
SearchPane.GetForCurrentView().ShowOnKeyboardInput = false;
ShowOnKeyboardInput 不存在。
为什么我不能覆盖 OnWindowCreated 并且看不到 ShowOnKeyBoardInput 属性?
更新:http://code.msdn.microsoft.com/windowsapps/Search-app-contract-sample-118a92f5/view/Discussions
最佳答案
我已经找到问题所在了。
OnWindowCreated 方法在 Windows 8 RTM 版本中实现。因此,如果您仍然遇到此问题,请升级您的 Windows。
关于c# - 为什么我无法覆盖 OnWindowCreated 并且看不到 ShowOnKeyBoardInput 属性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12134727/