1

Is there a way to change the pressed effect of a button on Android in a .NET MAUI project. Now it is showing a dark ripple effect when dark mode is on and a white ripple effect when the light mode is on. I would like to have the same ripple color for both dark and light mode. I tried to change the colorPrimary and colorPrimaryDark values but nothing changes.

1
  • I have created a new project to test the button on the android. The button showed the same ripple effect in the dark and light mode in my project. Commented Jan 30, 2023 at 7:51

1 Answer 1

0

The simplest way to achieve parity in both modes (and potentially across platforms) might be to override the button's default style with your own.

You can look into the default button style template, make a copy in you apps resources, and change the colors used to from default staticresource or dynamicresource to your desired color palette.

Sign up to request clarification or add additional context in comments.

2 Comments

Those use storyboards which I do not think are supported in .NET MAUI.
Buttons in MAUI does not have a control template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.