MAUI: Any alternative packages for Xam.Plugin.Media, DLToolkit.Forms.Controls.FlowListView, Xamarin.Plugin.FilePicker

Sreejith Sreenivasan 1,001 Reputation points
2023-09-18T14:30:54.9766667+00:00

I am using below packages in my Xamarin Forms project:

Xam.Plugin.Media: For opening camera and gallery in device and pick pictures

DLToolkit.Forms.Controls.FlowListView: For showing multiple items on a row

Xamarin.Plugin.FilePicker: For picking files from the device

Now I am migrating my Xamarin Forms project to MAUI and I research for the alternative package for the above mentioned packages. So far I didn't get anything useful.

Is there any alternative packages?

Developer technologies | .NET | .NET MAUI
{count} votes

2 answers

Sort by: Most helpful
  1. Leo Wagner de Souza 696 Reputation points
    2023-09-18T16:28:58.86+00:00

    Hello!

    To replace the file picker, check the FolderPicker:
    https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/essentials/folder-picker?tabs=android

    To use the camera and gallery, use the media picker:
    https://learn.microsoft.com/en-us/dotnet/maui/platform-integration/device-media/picker?tabs=android

    To display items in row, user Datagrid, Collectionview or HorizontalLayout:
    https://learn.microsoft.com/en-us/dotnet/maui/user-interface/layouts/grid
    https://learn.microsoft.com/en-us/dotnet/maui/user-interface/layouts/horizontalstacklayout
    https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/collectionview/

    Best Regards,

    Leo Wagner de Souza.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Sreejith Sreenivasan 1,001 Reputation points
    2023-09-21T13:49:02.0733333+00:00

    A workaround that might help you could be "CollectionView" from maui controls, A simple example of a view with 2 (or many spans as you want) could be:

    <CollectionView ItemsSource="{Binding Source}" ItemsLayout="VerticalGrid, 2">
      <CollectionView.ItemTemplate>
         <DataTemplate>
            <Label Text="{Binding Name}" LineBreakMode="TailTruncation"/>
            <Label Text="{Binding Status}" LineBreakMode="TailTruncation"/>
        </DataTemplate>
      </CollectionView.ItemTemplate>
    </CollectionView>
    

    After that you will get multiple binded view objects in the same row with your data as you said

    For more info you can read: CollectionView

    Use Media picker for photos and videos for picking picture from gallery or open camera.

    Use File picker for picking a file from device.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.