I'm new to .net and MVVM designmodel. I'm stuck now, because in the codebehind file of one of my Views, I need to get the corresponding Model as an object. How is the relationship here? Is it possible, and is it "the right way to do it"?
The View should access the ViewModel, which wraps the Model, hiding it from the View. If you need to access properties of the Model from the View, get the ViewModel to expose them as properties that the View can bind to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With