Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. COFirst i thought "why do it this way"?? because you suggest don't put any "logic" (like i'm doing) in XAML but in the VM. The enabling (or not) of a textbox is tightly coupled to XAML (i mean if i want to "adjust" a property of a UI-element, i will do it in XAML, so i will see that there is something set (or not)). So (as i understand) you 're transferring the solution to another place in the same arena! The only thing i don't like is to let the VM-code "clutter" around. Thanks Jose!
      singulars
    2. COYour VM should have all the code, your view should translate that to some visible representation(sometimes using converters). That could be disabling, making invisible, popping some kind of notification. Your VM shouldn't care what that is, but it should know that there is a specific state. The View then binds to that property. The closest to code that should be in the view is Converters because this decouples your View from your VM. E.g. a boolean to visibility converter allows your VM to have a boolean property while the View translates that boolean to 'Collapsed' or 'Visible'21
      singulars
    3. COYour view is basically just a visual translator. It translates lists into a combobox,listbox, or listview. A string,int,long,DateTime into a textbox. Of course your View and VM are "coupled" but only in the sense that your view needs to know what it's translating. Your View needs to know the ViewModel, but the ViewModel should never know about your View, when that happens the separation of concerns which MVVM brings in is severely compromised. I should be able to pop a VM into a Winforms app and it should not require any code change, just rebinding to the new desired View, but WPF is easier :)
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload