MR.Gestures handles ALL touch gestures

14567810»

Posts

  • Umar3xUmar3x Vincent Castagna FRMember ✭✭

    Hello all,

    I need to create my own button class for custom rendering needs. But it seems then that command binding is not triggered anymore.

    My class is simple :

    public class ButtonComponent : MR.Gestures.Button
    {

    }
    

    _validateButton.SetBinding(MR.Gestures.TappedCommandProperty,
    "ValidateAddingPinCommand");

    I put ButtonComponent.TappedCommandProperty to test if it would work with but same issue, nothing triggered.

    If you know why it does such a behavior or if I could find a workaround if inheritance is causing the issue, which could be a future problem for me for other controls :/

    Thanks for your response,

    Regards,

  • MichaelRumplerMichaelRumpler Michael Rumpler ATMember ✭✭✭✭

    @RyanMorris I try to keep all other gesture event handlers on the controls working in order not to break any native functionality. This includes dragging a map around.

    @aj-ja UWP doesn't check if there are multiple elements above each other and it triggers all elements which are at the touch coordinates. I don't know, which elements are on top and as I wrote above, I don't want to break any native functionality by suppressing any touch gestures.

    @Umar3x I don't understand what you're trying to do and how. Please send me a repro project.

  • Umar3xUmar3x Vincent Castagna FRMember ✭✭
    edited September 22

    Hello Michael ... I don't try to achieve anything. I'm just having a button class extending MR.Gestures.Button class ... and since I extend it this line do not work anymore, seems that as I extend it, the MR.Gestures.Button.TappedCommandProperty do not work anymore.

    public class ButtonComponent : MR.Gestures.Button
    {
    
    }
    

    private ButtonComponent _validateButton;

    _validateButton.SetBinding(MR.Gestures.Button.TappedCommandProperty, "ValidateAddingPinCommand");

    What I'm saying is that extending the class causes binding not to work.

    Thanks.

  • MichaelRumplerMichaelRumpler Michael Rumpler ATMember ✭✭✭✭

    The commands should also work in subclasses.
    Do you have a custom renderer for your ButtonComponent? Then the renderer must inherit from MR.Gestures.platform.Renderers.ButtonRenderer.

  • Umar3xUmar3x Vincent Castagna FRMember ✭✭

    Well it seems that it does not work with the subclass. I don't use a buttonRenderer. The command is simply not triggered.

14567810»
Sign In or Register to comment.