public MainListViewModel() { SharedInstance = this; Posts = new ObservableCollection <ImgurImage>(); SortTypes = new List <SortType>(); SortTypes.Add(new SortType() { Value = (int)ImgurGallerySort.Viral, Name = "Popular" }); SortTypes.Add(new SortType() { Value = (int)ImgurGallerySort.Time, Name = "Newest" }); CurrenSort = SortTypes[0]; RefreshCommand = new RelayCommand(ExecuteRefreshCommand); SetPopularCommand = new RelayCommand(ExecuteSetPopularCommand); SetNewestCommand = new RelayCommand(ExecuteSetNewestCommand); LoadData(); }
public PostViewModel(MainListViewModel parentViewModel) { ParentViewModel = parentViewModel; BackCommand = new RelayCommand(ExecuteBackCommand); ShareCommand = new RelayCommand(ExecuteShareCommand); }