Press ESC to close

Xamarin Forms File Picker

Hello friends. In this article, we will talk about how to select the file with Xamarin.Forms and put it into our application. Of course this will apply to Android. There is no option for iOS at this time. So we’ll talk to Android. When you try to run the application in an iOS environment, you will see that you will not respond to it already. First of all we need to install the plug-in. As you’ve seen below this plugin: Xam.Plugin.FilePicker.

Then we do the design part. I’m putting a button on the screen. I will select files with this button. Then the file name and the contents of the file is given to us. Below is a sample code. You can look in Debug mode.

var file = await CrossFilePicker.Current.PickFile(); 
labelDosyaismi.Text = file.FileName;

In fact you can only pull the file in this way. If you have any questions, you can contact me by comment or email.

 

Leave a Reply

Your email address will not be published. Required fields are marked *