Android and iOS buttons don't have CommandParameter
properties in the same way that Windows ones do.
However, MvvmCross did recently introduce a way to introduce CommandParameter
bindings via Value Converters - see http://slodge.blogspot.co.uk/2013/06/commandparameter-binding.html
This binding should work as:
bindingset
.Bind(saveButton)
.To(vm => vm.SaveDealerDataCommand)
.WithConversion("CommandParameter", true);
or:
bindingset
.Bind(saveButton)
.To(vm => vm.SaveDealerDataCommand)
.WithConversion(new MvxCommandParameterValueConverter(), true);
Note that this CommandParameter
binding isn't completely in the 3.0.8.1 package which is the stable nuget release, so to make this work you may need to either:
Add this manual value converter registration in your Setup.cs
protected override void FillValueConverters(IMvxValueConverterRegistry registry)
{
base.FillValueConverters(registry);
registry.AddOrOverwrite(
"CommandParameter",
new Cirrious.MvvmCross.Binding.MvxCommandParameterValueConverter()
);
}
Or use one of the beta nuget packages uploaded since 3.0.8.1 (set nuget to include prereleases to see these packages).
Or build the source yourself
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…