c# - Should the view model match closer to view or model? -


let's have view has view model data context. binded property called visible.

what type should property ?

  • boolean (more model friendly, forces use of converter) ?
  • visibility (more view friendly) ?

leave bool value in viewmodel , use booltovisibilityconverter in view.

reason:

viewmodel should view-agnostic, , ui-framework-agnostic. is, should able copy viewmodel console application , hit f5.

make sure leverage markupextension simplify converter usage


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -