mrxten / XamEffects

📱 Xamarin.Forms UI effects
MIT License
248 stars 41 forks source link

Question: button inside layout with effect #36

Open bodeg opened 5 years ago

bodeg commented 5 years ago

Thanks for the great plugin

In the following code snippet, the LongTap command works properly. What should I do to make the button to response and call its command?

BTW - in my case, the Frame is inside a ViewCell of a ListView

<Frame BackgroundColor="White"
       BorderColor="Black">
    <StackLayout
        xamEffects:Commands.LongTap="{Binding DebugCommand}"
        xamEffects:Commands.LongTapParameter="long tap command">

        <Label Text="I am a label" />
        <Button Text="Click Me"
                InputTransparent="True"
                Command="{Binding DebugCommand}"
                CommandParameter="button command" />

    </StackLayout>
</Frame>

With regards

mrxten commented 5 years ago

Try delete InputTransparent="True" from button.

bodeg commented 5 years ago

Thanks for your reply.

With or without InputTransparent attribute - the button does not call its command. Any idea?

mrxten commented 5 years ago

I will fix this in next release.

Now this package configuring InputTransparent himself sometime.

As hotfix you can subscribe to PropertyChanged event in button and determine when changed InputTransparent and change to false yourself

kochev commented 5 years ago

As hotfix you can subscribe to PropertyChanged event in button and determine when changed InputTransparent and change to false yourself

This WA not working. Button unclicable. When will the fix be released?

mrxten commented 5 years ago

Dont know, have not time now ¯_(ツ)_/¯