private void OnBrowseImagesButton(object sender, RoutedEventArgs e)
 {
     _question = (ImageQuestion)QuestionData.DataContext;
     if (!_question.IsFull())
     {
         try
         {
             _question.Parent.Parent.TakingPhoto = true;
             _question.ChooserTask.Show();
         }
         catch (InvalidOperationException) //catching double clicks
         {
         }
     }
     else
     {
         DisplayCapacityWarning();
     }
 }
 private void OnDelete(object sender, RoutedEventArgs e)
 {
     _question = (ImageQuestion)QuestionData.DataContext;
     Button button = sender as Button;
     _question.DeleteImage((ImageQuestion.ImageItem)button.DataContext);
 }
 /// <summary>
 /// Default constuctor which initializes component on page.
 /// </summary>
 public ImageQuestionControl()
 {
     InitializeComponent();
     _question = (ImageQuestion)QuestionData.DataContext;
 }