public Views() { this.InitializeComponent(); solarSystem = this.Resources["solarSystem"] as SolarSystem; view = CollectionViewSource.GetDefaultView(solarSystem.SolarSystemObjects) as ListCollectionView; }
private void AddPlanetX(object sender, RoutedEventArgs e) { SolarSystem system = this.Resources["solarSystem"] as SolarSystem; system.SolarSystemObjects.Add(new SolarSystemObject("Planet X", 3, 50000, new Uri(@"Images\planetx.jpg", UriKind.Relative), "This planet inhabited by aliens is cloaked so that humans can't see it.")); }