How do I open a dialog to view files in Xamarin.Forms?
When I executed:
OpenFileDialog dialog = new OpenFileDialog();
I am getting the following error :
Base class or interface 'System.ComponentModel.Component' in assembly 'System, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' of type 'System.Windows.Forms.CommonDialog' cannot be resolved c: \ Program Files (x86) \ Assembly References \ Microsoft \ Framework.NETFramework \ v4.5 \ System.Windows.Forms.dll
PS: I have added an assembly link System.Windows.Forms.dll
in relation to the solution.
source to share
There is no easy way to open a file browser in Xamarin.Forms as frameworks like iOS do not allow file system browsing.
Below is a link on how to achieve something like what you want on Android.
http://developer.xamarin.com/recipes/android/data/files/browse_files/
source to share