private void choosePhotoBtn_Click(object sender, RoutedEventArgs e) { realPhotoPathName = ChoosePhotoHelper.getFilenameFromUserChoose(); Button choosePhotoPBtn = (Button)sender; Image photo = (Image)FindName("photo"); choosePhotoPBtn.Visibility = System.Windows.Visibility.Collapsed; photo.Visibility = System.Windows.Visibility.Visible; if (!realPhotoPathName.Equals("")) { photo.Source = ChoosePhotoHelper.getRealPhoto(realPhotoPathName); } }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { string photopath = (string)value; return(ChoosePhotoHelper.getRealPhoto(photopath)); }