After avoiding MVVM for weeks, I finally decided to give it another shot. In my head, what I am trying to achieve is relatively simple. I want to shrink a frame, update the text within the frame, then enlarge the frame again to its normal size
In my codebehind, I have a method that scales a frame to 0.1 when the frame is tapped. I have this as a gesture recognizer in the code behind because my understanding was that animations had to be in the view.
In my ViewModel, I have a property called FrameText. This is the value I want to update. I want to update the property before it scales back up. So this is what I came up with.
>await TestFrame.ScaleTo(0.1, 60, Easing.Linear);
>ViewModels.MainViewModel.FrameText = "new text";
>await TestFrame.ScaleTo(1, 60, Easing.Linear);
I quickly realized that this is flawed, but after spending a few hours trying to understand how MVVM works I figured it was better to ask. Should I not use MVVM here at all? Am I misunderstanding how MVVM works? Thank you in advance.