Reputation: 41
When I executed :
OpenFileDialog dialog = new OpenFileDialog();
I am getting the below error :
The base class or interface 'System.ComponentModel.Component' in assembly 'System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' referenced by type 'System.Windows.Forms.CommonDialog' could not be resolved c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Windows.Forms.dll
P.S.: I have added reference to assembly System.Windows.Forms.dll
in reference of solution.
Upvotes: 4
Views: 6239
Reputation: 6786
There's no simple way to open a file browser in Xamarin.Forms as environments such as iOS don't allow browsing the file system.
The link below shows a recipe of how to achieve something like what you want on Android.
http://developer.xamarin.com/recipes/android/data/files/browse_files/
Upvotes: 3