///////////////////////////////////////////////////// // Private Methods ///////////////////////////////////////////////////// private void drillDown() { _currentLayer++; // create new layer if not exist if (_currentLayer > _imageCarousels.Count) { _currentCarousel = new ImageCarousel(); _imageCarousels.Add(_currentCarousel); Holder.Children.Add(_currentCarousel); _currentCarousel.Start(); _currentCarousel.DrillAppear(); } else { // get the current layer if exist _currentCarousel = _imageCarousels[_currentLayer - 1]; _currentCarousel.DrillAppear(); } // Drill down the next layer (need to check if it exist) if (_currentLayer - 2 >= 0) { ImageCarousel imageCarousel = _imageCarousels[_currentLayer - 2]; imageCarousel.DrillDown(); } }
// Drill up the current layer private void drillUp() { if (_currentLayer > 1) { _currentLayer--; _currentCarousel = _imageCarousels[_currentLayer - 1]; _currentCarousel.DrillUp(); // remove the last layer if (_currentLayer + 1 <= _imageCarousels.Count) { ImageCarousel imageCarousel = _imageCarousels[_currentLayer]; imageCarousel.DrillDisappear(); } } }