//Calls mainPage click event handler when take image button is clicked
 private void takeImage_Click(object sender, RoutedEventArgs e)
 {
     btnTakePicture.IsEnabled = false;
     mainPage.takeFrontImage_Click();
 }