I am designing menu and I have list of items in VariableSizedWrapGrid.
I want to change border thickness of Current active element on MouseOver also I want to change foreground color of title of child TextBlock. How should I achieve this in UWP using MVVM?
Way I know is:
-
Use Interaction and call ViewModel command on MoseOver.
-
Command will set BorderWidth property of VIewModel
-
BorderWidth property would bind to BorderThickness property of control
BorderThickness="{Binding BorderWidth}"
This will work great with one VariableSizedWrapGrid's item. But I have 3 items. Do I need to create 3 commands with 3 ViewModel Properties which will bind border thickness to respective item?