Esempio n. 1
0
 public static ISearchView ShowPicker(
     SearchContext context,
     Action <SearchItem, bool> selectHandler,
     Action <SearchItem> trackingHandler   = null,
     Func <SearchItem, bool> filterHandler = null,
     IEnumerable <SearchItem> subset       = null,
     string title = null, float itemSize = 64f, float defaultWidth = 850f, float defaultHeight = 539f, SearchFlags flags = SearchFlags.None)
 {
     if (subset != null)
     {
         context.subset = subset.ToList();
     }
     context.options |= flags | SearchFlags.OpenPicker;
     SearchAnalytics.SendEvent(null, SearchAnalytics.GenericEventType.QuickSearchPickerOpens, context.searchText, "item", "api");
     return(SearchPickerWindow.ShowPicker(new SearchViewState(context, selectHandler)
     {
         trackingHandler = trackingHandler,
         filterHandler = filterHandler,
         title = title,
         itemSize = itemSize,
         position = new Rect(0, 0, defaultWidth, defaultHeight)
     }.SetSearchViewFlags(SearchViewFlags.None)));
 }
Esempio n. 2
0
 /// <summary>
 /// Open and show the Search Picker window.
 /// </summary>
 /// <param name="viewState">View parameters</param>
 /// <returns>Returns the newly create search view instance.</returns>
 public static ISearchView ShowPicker(SearchViewState viewState)
 {
     return(SearchPickerWindow.ShowPicker(viewState));
 }