VCurrent and vSelected
No edit summary
No edit summary
Line 12: Line 12:
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.
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
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


{{Edited|July|12|2024}}
{{Edited|July|12|2024}}

Revision as of 17:07, 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 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 54 days ago on 03/04/2024. What links here