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(); }
private void ViewModelSwitch(FilterTuple filterTuple) { FilterViewSelectedItem = FilterViewCollection.FirstOrDefault(x => x.ViewModel.GetType().Name == filterTuple.ViewModelType.ToString()); }