anpin / ContextMenuContainer

Native context menu for any Xamarin.Forms or MAUI view
MIT License
55 stars 5 forks source link

Doesn't work on MAUI #13

Closed nathenxbrewer closed 2 weeks ago

nathenxbrewer commented 2 weeks ago

.NET 8 Trying to get this to work on an iOS simulator and it just doesn't work whatsoever. I'm holding, clicking, right clicking, nothing is showing a context menu.

 <apes:ContextMenuContainer x:Name="ActionsInline"  Grid.Column="1">
        <apes:ContextMenuContainer.MenuItems>
            <apes:ContextMenuItem Text="My action" />
            <apes:ContextMenuItem Text="My destructive action" 
                                  IsDestructive="True"/>
        </apes:ContextMenuContainer.MenuItems>
        <apes:ContextMenuContainer.Content>
            <!-- Power Button -->
                <Image
                    HeightRequest="36"
                    WidthRequest="36"
                    Source="grp_standby_on_normal.png"
                    BackgroundColor="Transparent"
                    VerticalOptions="Center" />
        </apes:ContextMenuContainer.Content>
    </apes:ContextMenuContainer>
anpin commented 2 weeks ago

Do you have ConfigureContextMenuContainer() in your MauiApp builder ?

nathenxbrewer commented 2 weeks ago

No. That's not listed in the How To Use section...

nathenxbrewer commented 2 weeks ago

I decided to go with another package anyways since this does not support on click/tap, only long hold. Thanks

anpin commented 2 weeks ago

Would you share the alternative you have used?

Documentation issue https://github.com/anpin/ContextMenuContainer/issues/11

nathenxbrewer commented 2 weeks ago

https://github.com/the49ltd/The49.Maui.ContextMenu

For this specific project, I actually would prefer a more custom-styled menu so if you can make yours work programmatically or with the ability to choose the trigger, I would prefer to use yours. I think The49's looks great, but I tend to lean towards platform agnostic UI/UX with my apps.

anpin commented 2 weeks ago

@nathenxbrewer PR's are welcome!