c# - Passing a string parameter to another layout MvvmCross -
So basically I want to send a string parameter to another view model, but I keep the zero value back.
My first view model is the command to call other layouts with this string parameter
public icemand report comand {get new MvxCommand ((=) ShowViewModel & Lt; secondViewModel & gt; (new {param = "नमस्ते"}); }} My second viewmodel is
Public Zero Init (string value) {string a = val; But I always get a blank value for "val"
Why are any thoughts happening?
I have an App Output
mvx: Diagnostic: 62.54 View column for missing parameter ViewModel - Missing parameter report name - Assuming blank - Failed for these values types It is possible! Mvx: Diagnostic: 62.54 Observing Parameters for Calling ViewModel - Missing Parameter Report Name - Assuming Blank - This value can fail for types! Name
In your example by the MvvmCross Match parameter, you should call:
ShowViewModel & lt; SecondViewModel & gt; (New {val = "hello"}) See section 1. Construction and 2. Init () here:
Comments
Post a Comment