public LearningPage()
        {

            Animals animals = new Animals();

            InitializeComponent();

            for (int i = 0; i < animals.getSize(); i++)
            {
                PivotItem pivotItem = new PivotItem();
                Image image = new Image();

                image.Source = new BitmapImage(animals.getAnimalIndex(i).getAnimalImage());
                pivotItem.Header = animals.getAnimalIndex(i).getAnimalName();
                pivotItem.Content = image;

       

                AnimalLearningPivot.Items.Add(pivotItem);
            }

            //on animal selection take them to a seperate scene with animal name, animal facts, and animal sounds. 
            //need to research animal facts and add them to xml files
            

            //create image view with each animal in it
            //add event when animal is clicked update thread
            //
        }
        private void AnimalLearningPivot_Tap_1(object sender, System.Windows.Input.GestureEventArgs e)
        {
            SoundLoader soundLoader = new SoundLoader();
            int selectedItem = AnimalLearningPivot.SelectedIndex;

            Animals animals = new Animals();
            Animal animal = animals.getAnimalIndex(selectedItem);
            soundLoader.playSoundFromURI(animal.getAnimalSound());
        }
 // Initializes fields and properties, randomizes the animals list, and sets the
 // currentIndex to the first random animal index
 public void Initialize()
 {
     animals       = new Animals();
     animalIndexes = new int[animals.getSize()];     // initialize list of indexes
     for (int i = 0; i < animals.getSize(); i++)
     {
         animalIndexes[i] = i;
     }
     RandomizeAnimals();                             // randomize index order
     currentIndex = 0;                               // index of current animal
     animals.setUsed(animalIndexes[currentIndex]);   // set the first animal as used
     results.Clear();                                // clear the previous results
 }
        public LearningPage()
        {
            Animals animals = new Animals();
            

            InitializeComponent();

            for (int i = 0; i < animals.getSize(); i++)
            {
                PivotItem pivotItem = new PivotItem();
                Image image = new Image();

                image.Source = new BitmapImage(animals.getAnimalIndex(i).getAnimalImage());
                pivotItem.Header = animals.getAnimalIndex(i).getAnimalName();
                pivotItem.Content = image;

                AnimalLearningPivot.Items.Add(pivotItem);
            }
        }
        public LearningPage()
        {
            Animals animals = new Animals();


            InitializeComponent();

            for (int i = 0; i < animals.getSize(); i++)
            {
                PivotItem pivotItem = new PivotItem();
                Image     image     = new Image();

                image.Source      = new BitmapImage(animals.getAnimalIndex(i).getAnimalImage());
                pivotItem.Header  = animals.getAnimalIndex(i).getAnimalName();
                pivotItem.Content = image;

                AnimalLearningPivot.Items.Add(pivotItem);
            }
        }
 // Initializes fields and properties, randomizes the animals list, and sets the
 // currentIndex to the first random animal index
 public void Initialize()
 {
     animals = new Animals();
     animalIndexes = new int[animals.getSize()];     // initialize list of indexes
     for (int i = 0; i < animals.getSize(); i++)
         animalIndexes[i] = i;
     RandomizeAnimals();                             // randomize index order
     currentIndex = 0;                               // index of current animal
     animals.setUsed(animalIndexes[currentIndex]);   // set the first animal as used
     results.Clear();                                // clear the previous results
 }