简体   繁体   中英

How to pass Multiple parameters as CommandParameter in InvokeCommandAction in Windows phone

I read this posing about passing multiple parameters as commandParameter in InvokeCommandAction: How to pass Multiple parameters as CommandParameter in InvokeCommandAction In WPF App Using MVVM But that solution is for WPF.

I want to do the same on Windows phone 8.1. The IMultiValueConverter is not available on Windows phone.

How can I do solve it on windows phone?

you can make a model that contains your mulit parameters.

eg:

public class ParameterModel
{
    public string A { get; set;}
    public string B { get; set;}
}

and in your CommandParameter you can bind the model

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM