Changes

Property Direct Edit (Client)

61 bytes added, 10:01, 9 July 2021
[[File:UBIK_Xamarin_UI_Template_PropertyDirectItemString_Debug_InEditing.png|thumb|The same template now in edit mode (Xamarin)]]
In the example demonstrated in the screenshot where a test template is used to enable direct editing of a String/Text typed property, the following members of the PropertyViewModel are involved.
* '''InEditing''': This is the boolean member indicating whether the PropertyViewModel is currently in edit mode. It can be used to decide whether the UI should display the DisplayValue text or present a text box for user input;* '''Description''': This is the description of the underlying property/meta property;* '''ValueItem.PropertyValue''': This is the value of property stored at the PropertyViewModel which can differ from the underlying property value because there can be editing changes not yet confirmed/saved. It can be read from and written to by the text box;* '''DisplayValue''': This is the textual version of ValueItem.PropertyValue used for displaying when the InEditing is false;* '''StartDirectEditCommand''': Sets InEdit to true and starts the direct editing session. In the example, this is linked to the tapped event of the entire template area;* '''ConfirmEditCommand''': Confirms the edit and sets InEdit to false. Even if the property value is not changed, this will give the property a new validation timestamp, technically modifying the property;* '''SaveAndCommitCommand''': In addition to confirming the edit, this also saves the changes to the underlying property, saves the owner object and attempts to commit it if the sync mode allows;* '''ResetCommand''': Resets the underlying property to its last known server state, saves the owner object and attempts to commit it if the sync mode allows;* '''DiscardChangeCommand''': Discards all changes made at the PropertyViewModel level and not yet saved to the underlying property;* '''DeleteValueCommand''': Sets the underlying property's value(s) to null and erases its validation timestamp, saves the owner object and attempts to commit it if the sync mode allows;* '''CancelEditCommand''': Cancels the current editing session and discards all changes made at the PropertyViewModel '''in that session''' (different from DiscardChangeCommand).
{{Hint|Once again, you can use the [[Developer_Mode]] to find out more about the PropertyViewModel, like where they are available and how they can be accessed in XAML, or what other data/members are available underneath, etc.}}
=== Relevant behaviors and controls ===