Wednesday, April 24, 2013

N=4: ValueConverters (N+1 days of MvvmCross)

This N+1 video is about ValueConverters


This video moves 'quite fast' - I'm assuming now that I don't have to explain how we create basic apps - if you find this too fast, then please return to the earlier videos :)


In this video we:
  • Create a simple ViewModel which has one text property, Foo
  • Create a number of ValueConverters to convert to/from the Foo string
  • Rush through the creation of sample apps on all 4 platforms which use those ValueConverters

The video is:






I like ValueConverters and I use them a lot:
  • Partly this is because they really help when it comes when converting from cross-platform data types (like MvxColor and MvxVisibility) to platform specific equivalents
  • And partly this is because I use them for validation/control visual effects - e.g for enabling/disabling controls while async network calls are occurring


However, not everyone likes them and I have a lot of respect for the opinions of those who don't like them... If you would like some in-depth background to some of the contentious issues about ValueConverters then check out: http://programmers.stackexchange.com/questions/114090/are-value-converters-more-trouble-than-theyre-worth



I think next on N+1 (tomorrow) I will start to look at some Plugins.


If you've got any feedback on this series - or anything you'd like to see covered, then please get in touch.


Previously in N+1:

1 comment:

  1. Perhaps you should put a tag in this series ;)

    ReplyDelete