VCurrent and vSelected

ViewModels create and maintain vCurrent_ and vSelected_ variables for each level of your ViewModel-nestings.

The values maintained by the Framework reflect what the user has focused on/clicked last (vCurrent_), and when you allow multi-select in grids, the vSelected_ collection is maintained.

The variables are strongly typed to match your nestings and get the postfix name from the nesting.

See this article for a fuller discussion on how to cursor your ViewModel.

See also: How to use vCurrent and “self” correctly in viewmodels

Update vSelected maintaince in Turnkey

Complex issue with vSelected in Turnkey - when you have not checked the SelectedBox - you still want the vCurrent to be part of the vSelected - but then you want it removed from vSelected if the only reason for being in vSelected was that it was vCurrent.

This issue is not complex in WPF because there is a natural difference between the focused and selected and UI controls automatically include the focused in the selected collection - but on the web we have the extra checkbox and we must know the reason for being in vSelected - is it only because we was vCurrent before - and thus should we be removed from vSelected.


This page was edited 47 days ago on 03/04/2024. What links here