dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

Improve DisplayActionSheet #9591

Open jrahma opened 2 years ago

jrahma commented 2 years ago

Description

Hi,

DisplayActionSheet needs to be improved as MAUI is also the new generation of Xamarin. We should be able to set an icon fo every item as well as unique ID or Class ID and then read the ID instead of the description.

Also, the icon can be a Resource icon or an IconFont

Public API Changes

var actionSheet = await DisplayActionSheet("Please Select”, “Back”, null, 
{
   {“ID1”, “icon1”, “text1”},
   {“ID2”, “icon2”, “text2”},
});

Then:

if (actionSheet.ID == "ID1")
{
    ...........
    ...........
}

or:

if (actionSheet.Text == "text1")
{
    ...........
    ...........
}

Intended Use-Case

Enhance DisplayActionSheet

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

jfversluis commented 2 years ago

I'll add it to the backlog for now, however I don't think this is possible on the platforms itself. So if we were to implement this it would need to be something custom made. And to be honest I doubt if that is something we will do. We will evaluate at a later stage.