Expand Search Charm programmatically

大城市里の小女人 提交于 2019-12-24 07:46:09

问题


Is it possible to expand the search charm programmatically? I want to have a search button in my windows 8 app which expands the search charm.


回答1:


According to Object Browser:

public void Show(string query)

Member of Windows.ApplicationModel.Search.SearchPane.

see http://msdn.microsoft.com/en-us/library/windows/apps/windows.applicationmodel.search.searchpane.show.aspx




回答2:


Windows.ApplicationModel.Search.SearchPane.GetForCurrentView().Show();




回答3:


Hi add this below method in App.xaml.cs file

protected async override void OnSearchActivated Windows.ApplicationModel.Activation.SearchActivatedEventArgs args)
{

}


来源:https://stackoverflow.com/questions/10986838/expand-search-charm-programmatically

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!