Ejemplo n.º 1
0
 public Views()
 {
     this.InitializeComponent();
     solarSystem = this.Resources["solarSystem"] as SolarSystem;
     view        = CollectionViewSource.GetDefaultView(solarSystem.SolarSystemObjects) as ListCollectionView;
 }
Ejemplo n.º 2
0
        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."));
        }