private void OpenPhoto(object sender, RoutedEventArgs e) { var dialog = new OpenFileDialog(); if (dialog.ShowDialog() == true) { viewModel.OpenFile(dialog.FileName); } }