VCurrent and vSelected
(Automatically adding template at the end of the page.)
No edit summary
Line 8: Line 8:


See also: [[Training:How to use vCurrent and “self” correctly in viewmodels|How to use vCurrent and “self” correctly in viewmodels]]
See also: [[Training:How to use vCurrent and “self” correctly in viewmodels|How to use vCurrent and “self” correctly in viewmodels]]
[[Category:View Model]]
 
==== 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 you are a natural difference between the focused and selected and UI controls automatically include the focused in the selected collection - but on the web 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
[[File:Documentation VCurrent and vSelected 1709312562167.gif|none|thumb|1115x1115px]]
{{Edited|July|12|2024}}
{{Edited|July|12|2024}}

Revision as of 17:03, 1 March 2024

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 you are a natural difference between the focused and selected and UI controls automatically include the focused in the selected collection - but on the web 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

Documentation VCurrent and vSelected 1709312562167.gif
This page was edited 54 days ago on 03/04/2024. What links here