How to change the color of an svg image on mouse hover in xaml c#

HEMANT MARATHE 1 Reputation point
2022-11-28T05:55:03.597+00:00

I want to use the .svg image for the icon of my application. But I want to change the color of svg image on mouse hover dynamically.

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,709 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Hui Liu-MSFT 47,331 Reputation points Microsoft Vendor
    2022-11-28T09:44:40.093+00:00

    Hi, @HEMANT MARATHE . You could try to refer to the sample code below.
    The sample code:

    264742-image-svg-mouseover-trigger-color.txt
    The result:
    264698-5.gif

    ----------------------------------------------------------------------------

    If the response is helpful, please click "Accept Answer" and upvote it.
    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.