} //inotifypropetychanged on list / binding mmvm lite/prison public MainWindow() { InitializeComponent(); AppID = new ObservableCollection <int>(DataHandle.LoadIds()); Items = new ObservableCollection <newsitem>(SteamLoadData.GetNewsByIDs(AppID.ToList())); AllItems.ItemsSource = Items = new ObservableCollection <newsitem>(SteamLoadData.GetNewsByIDs(AppID.ToList())); AllGames.ItemsSource = AppID; NewsWindow.Visibility = Visibility.Visible; GameEditWindow.Visibility = Visibility.Hidden; if (Items.Count() == 0) { IsEmpty.Visibility = Visibility.Visible; } }
private void News_Click(object sender, RoutedEventArgs e) { NewsWindow.Visibility = Visibility.Visible; GameEditWindow.Visibility = Visibility.Hidden; AllItems.ItemsSource = Items = new ObservableCollection <newsitem>(SteamLoadData.GetNewsByIDs(AppID.ToList())); }