How to fix Visual State Bug?

Benjamin Moser 26 Reputation points
2023-11-03T09:04:05.3266667+00:00

If my State "Normal" does set a color property to "Transparent" it works at first. After i set the color property to an actual color through another state and then back to normal the color "Transparent" will not be set or shown. Is that a bug or do i have to do it another way? Workaround was to set the opacity but i would rather use a solution with only the color property.

Thanks for your help in advance!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,056 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 70,641 Reputation points Microsoft Vendor
    2023-11-07T05:17:12.5+00:00

    Hello,

    You can do it by using Background property, then you can set the color property to "Transparent".

    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.