Hello,
Welcome to Microsoft Q&A!
Change color icon in the ListView UWP
For your requirement, the better way is using
XamlBehaviors to edit the property witin DataTempate. You could use EventTriggerBehavior to detect the pointer hover event then edit icon's Foreground property. For the detail please refer the following code.
<!--<Core:EventTriggerBehavior EventName="PointerEntered" SourceObject="{Binding ElementName=GridPanel}">
<Core:ChangePropertyAction
PropertyName="Foreground"
TargetObject="{Binding ElementName=MyIcon}"
Value="Red"
/>
</Core:EventTriggerBehavior>-->
<!--<Core:EventTriggerBehavior EventName="PointerExited" SourceObject="{Binding ElementName=GridPanel}">
<Core:ChangePropertyAction
PropertyName="Foreground"
TargetObject="{Binding ElementName=MyIcon}"
Value="Black"
/>
</Core:EventTriggerBehavior>-->
Thank you.
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.