예제 #1
0
        private void InitializeData(FilterTuple filterTupleStartup)
        {
            if (filterTupleStartup != null)
            {
                EnumViewModelType enumViewModelTypeStartup = filterTupleStartup.ViewModelType;

                if (FilterViewCollection.Where(x => x.ViewModel.GetType().Name == filterTupleStartup.ViewModelType.ToString()).Any())
                {
                    FilterViewSelectedItem = FilterViewCollection.FirstOrDefault(x => x.ViewModel.GetType().Name == filterTupleStartup.ViewModelType.ToString());
                }
                else
                {
                    FilterViewSelectedItem = FilterViewCollection.ElementAt(0);
                }
            }
            else
            {
                FilterViewSelectedItem = FilterViewCollection.ElementAt(0);
            }

            CurrentlyBuiltFilter = new BuiltFilterModel(FilterService);
            CurrentlyBuiltFilter.BindFilterSectionCollection();
        }
예제 #2
0
 private void ViewModelSwitch(FilterTuple filterTuple)
 {
     FilterViewSelectedItem = FilterViewCollection.FirstOrDefault(x => x.ViewModel.GetType().Name == filterTuple.ViewModelType.ToString());
 }