问题
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