public HelpScreen(ImageViewer iv)
 {
     this.InitializeComponent();
     this.iv = iv;
 }
 public ImageViewerHelper(ImageViewer iv)
 {
     this.InitializeComponent();
     this.iv = iv;
 }
        /// <summary>
        /// Handle a button click from the wrap panel.
        /// </summary>
        /// <param name="sender">Event sender</param>
        /// <param name="e">Event arguments</param>
        private void ImageSelected(object sender, RoutedEventArgs e)
        {
            var button = (KinectTileButton)e.OriginalSource;
            string selectedImage = button.Label as string;
            string url = "";

            // find the selected image
            for(int i = 0; i < this.wrapPanel.Children.Count; i++)
            {
                var currentButton = (KinectTileButton)this.wrapPanel.Children[i];
                if (currentButton.Label.ToString() == selectedImage)
                    url = DeviantInteraction.getImageFullSize(images[i].link);
            }

            // open a new window to show that Image
            var imageViewer = new ImageViewer(url, categoryName, selectedImage);
            imageViewer.Show();

            e.Handled = true;
        }