Пример #1
0
        public object Convert(object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            TileClickCommandParameters parameters = new TileClickCommandParameters();

            SearchType searchType = (SearchType)values[0];
            string searchContext = values[1].ToString();

            parameters.SearchType = searchType;
            parameters.SearchContext = searchContext;
            //parameters.SourceElement = sourceElemenet;
            //parameters.InputData = objectType;
            //foreach (var obj in values)
            //{
            //    if (obj is ObservationDataItem) parameters.Item = (ObservationDataItem)obj;
            //    else if (obj is TextBox) parameters.Source = (TextBox)obj;
            //}
            return parameters;
        }
Пример #2
0
        public void OnTileClick(TileClickCommandParameters parameters)
        {
            SearchType type = parameters.SearchType;

            SearchView searchView = new SearchView();
            SearchViewModel searchModel = new SearchViewModel(new SearchServiceProxy(), type);
            searchView.DataContext = searchModel;

            string newTitle = "";

            if (type == SearchType.ObjectSearch)
                newTitle = "Search objects by identifier or name";
            else
                newTitle = "Search catalogs by name";

            _shellViewCoordinator.NavigateTo(searchView, newTitle);
        }