How do we use this?
Closed this issue · 21 comments
I just downloaded the code from here and tried to open the solution and it fails with the error that's on the screenshot. I didn't realize it was on nuget and it seems to, almost, work. I'm trying to use it in a CarouselView, it doesn't quite function. I attached a small sample if you wanna check it out,
TestSfListView.zip
please.
@rezamohamed sorry haven't seen the screenshot in the email client. I guess you need the MSBuild.Sdk.Extras installed on mac somehow as the error suggests, but I'm building it on Windows so not sure if it is viable. I'll check you repro later this week.
yep! that was it! thanks, looks to be working like a charm now.
Pavel, from the context actions, can I execute a codebehind clicked event rather than a viewmodel command and also pass the command parameter to the codebehind event?
right, because it is a method, not a property
I'm not following. My question is I have the Contextmenu in Carousel.xaml, and I have an event in Carousel.xaml.cs that I want to trigger when the user clicks ContextMenu. The Command triggers a command in the ViewModel, How would I invoke an event in the codebehind?
With the InvokeCommand you mentioned above, I guess I am unclear how to use it.
Any chance of adding it please? just a way to trigger an event, and send the parameters to the event via CommandParameter. It would make the component fully usable at that point.
Appreciate that, will keep an eye out for a new version. This component fills a big gap, in my opinion, especially for Carousel where the swipe methods for actions are limited. Great work.
Appreciate that, will keep an eye out for a new version. This component fills a big gap, in my opinion, especially for Carousel where the swipe methods for actions are limited. Great work.
Please find version 1.0.6 on nuget with the event added
I do see it now, in the BindingContext of the ContextMenuItem that is returned via sender. Is that what you are referring to? I would have to drill down to get that info, usually it would just be sent via EventArgs, so it was different. Can you confirm, please?
private void CarouselDelete_OnItemTapped(object sender, EventArgs e)
{
var x = (ContextMenuItem) sender;
var y = x.BindingContext;
}
x, y:
yep! I see it now. Works perfectly. Thanks