Is it possible to access a property which is located in a ViewModel from outside of the ViewModel? I'm running a check (TriggerAction) on one of my entries, and I need to access a property (a double) from my ViewModel, which I need to use to limit my numeric entry. I was able to come up with a way to actually limit my entry to not go above a certain number, but I need it to not go above this specific number from my ViewModel.
Asked
Active
Viewed 98 times
0
-
of course. A VM is just a class. If you have an instance of a class, you can access it's public properties. – Jason Oct 27 '20 at 14:29
-
1refer to my post on another question https://stackoverflow.com/questions/64285766/view-to-different-view-model-binding-in-xamarin-forms/64286130#64286130 – Shubham Tyagi Oct 27 '20 at 15:23
-
1Sure, you can access ViewModel properties, share us some relevant code please. – nevermore Oct 28 '20 at 07:27