Closed lukewire129 closed 7 months ago
OnTapped is an event, you should pass a callback like .OnTapped(()=>...)
or .OnTapped(MyMethod)
Will it be difficult to work with parameters in the future?
do you mean the arguments of the OnTapped event? if so any event in MauiReactor allows you to access event args using code like this:
.OnTapped((s, e)=> e. is of type TappedEventArgs)
or
.OnTapped(MyEvent)
void MyEvent(object? sender, TappedEventArgs args)
{
...
}
Ahhh! I thought I understood OnTapped as follows. https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/gestures/tap?view=net-maui-8.0
I was asking if it would be possible to customize it to be similar to Command and CommandParameter :)
Ok, I see now what you mean. To fully customize the tap gesture you have to create a TapGestureRecognizer like the following:
CollectionView(
TapGestureRecognizer()
.Buttons(MauiControls.ButtonsMask.Secondary)
.NumberOfTapsRequired(2)
.OnTapped(()=>...)
)
.ItemsSource(ItemsSource, RenderItem)
In the future, please provide a more descriptive explanation of your issues
Thank you :)
Grid Available CollectionView Unavailable
I've followed the reference, but I'm using the same 'CellExtensions', but I'm not seeing the Why is this happening?
EmptyItemArea Method