I'm Working on windows phone application.in my application i have a photo upload option, for this i'm using PhotoChooserTask. here is my code,
void photoChooserTask_Completed(object sender, PhotoResult e) { if (e.TaskResult == TaskResult.OK) { System.Windows.Media.Imaging.BitmapImage bmp = new System.Windows.Media.Imaging.BitmapImage(); bmp.SetSource(e.ChosenPhoto); string PhotoPath = e.OriginalFileName.; MessageBox.Show("" + PhotoPath); // just for testing myImage.Source = bmp; myImage1.Source = bmp; } }
i want to get file name of the image selected from user.
MessageBox.Show("" + PhotoPath)
which display file path,something like
c:\Data\Users\Public\Pictures\Sample Pictures\Sample_image_00.jpg
how can i get the name of image without file path?
Thanks in advance!