Giter Site home page Giter Site logo

Comments (21)

anpin avatar anpin commented on May 27, 2024

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

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.

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

@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.

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

The issue is that on the CarouselView, the first CarouselItem is displayed in the background. In the image below, you can see the first item displayed between the two side-by-side (behind, like it's in the background). There is also a jitter on first appearing.

Screen Shot 2021-06-07 at 12 52 35 PM

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

yep! that was it! thanks, looks to be working like a charm now.

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

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?

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

ContextMenuItem has InvokeCommand method which executes the Command like this
image

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

I'm on v1.0.5, I don't see Invoked. Screenshot below.
Screen Shot 2021-06-08 at 10 28 52 AM

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

right, because it is a method, not a property

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

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.

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

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.

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

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.

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

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

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

ItemTapped event works, but the EventArgs is not working. My expectation was that the EventArgs would populate whatever is defined in the CommandParameter...but this isn't working. The CommandParameter does work for the Command however.
Screen Shot 2021-06-10 at 1 38 44 PM

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

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;
    }

Screen Shot 2021-06-11 at 12 31 01 AM

x, y:

Screen Shot 2021-06-11 at 12 31 35 AM

from contextmenucontainer.

anpin avatar anpin commented on May 27, 2024

from contextmenucontainer.

rezamohamed avatar rezamohamed commented on May 27, 2024

yep! I see it now. Works perfectly. Thanks

from contextmenucontainer.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.