Hello,
Welcome to our Microsoft Q&A platform!
I get the same issue as yours, please open a issue in Xamarin.CommunityToolkit Github page.
If the tag outside your <Stacklayout>
is <ContentPage>
, you can add xct:TouchEffect
to <ContentPage>
like following code. Button click command and xct:TouchEffect
worked as normal in my side.
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
xmlns:app8="clr-namespace:App8"
xct:TouchEffect.Command="{Binding PressedCommand}"
xct:TouchEffect.NativeAnimation="True"
xct:TouchEffect.AnimationDuration="500"
xct:TouchEffect.AnimationEasing="CubicInOut"
xct:TouchEffect.PressedScale="1.2"
x:Class="App8.MainPage">
<StackLayout>
<StackLayout.BindingContext>
<app8:MyWiewModel />
</StackLayout.BindingContext>
<Button Text="click" Command="{Binding NaviCommand}"></Button>
</StackLayout>
</ContentPage>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.