Difference between revisions of "EditPropertyValueCommand"
(Created page with "== EditPropertyValueCommand == This command is used to open a dialog for editing a property. == Command Properties == * ID: String. The ID of the property to be edited. * Sca...") |
m |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
This command is used to open a dialog for editing a property. | This command is used to open a dialog for editing a property. | ||
− | == Command Properties == | + | It is located on the ContentViewModel, and as such can be used from the UI of an object to edit its MetaProperties. |
+ | |||
+ | {{Attention|Note that a Save and Commit on the ContentViewModel is automatically triggered once the edit is confirmed.}} | ||
+ | {{Hint|If your usecase requires that the property change '''is not automatically saved''', instead use the (PropertyViewModel).ShowEditorCommand / .PropertyClickedCommand to trigger the edit dialogue of a specific MetaProperty.}} | ||
+ | |||
+ | |||
+ | === Command Properties === | ||
* ID: String. The ID of the property to be edited. | * ID: String. The ID of the property to be edited. | ||
* ScanToInput: bool. If this is false (default) a textbox for editing is shown. If true, a scan dialog appears, that allows to scan a barcode. | * ScanToInput: bool. If this is false (default) a textbox for editing is shown. If true, a scan dialog appears, that allows to scan a barcode. | ||
Line 17: | Line 22: | ||
</Button> | </Button> | ||
</source> | </source> | ||
+ | |||
+ | [[Category:XAML|EditPropertyValueCommand]] |
Latest revision as of 15:09, 7 January 2025
This command is used to open a dialog for editing a property.
It is located on the ContentViewModel, and as such can be used from the UI of an object to edit its MetaProperties.
![]() | Note that a Save and Commit on the ContentViewModel is automatically triggered once the edit is confirmed. |
Command Properties
- ID: String. The ID of the property to be edited.
- ScanToInput: bool. If this is false (default) a textbox for editing is shown. If true, a scan dialog appears, that allows to scan a barcode.
Example:
<Button Command="{Binding EditPropertyValueCommand}" Text="ScanToEdit">
<Button.CommandParameter>
<uc:KeyValueList>
<uc:KeyValueParameter Key="ID" Value="TEXT_READWRITE" />
<uc:KeyValueParameter Key="ScanToInput" Value="true" />
</uc:KeyValueList>
</Button.CommandParameter>
</Button>
<Button.CommandParameter>
<uc:KeyValueList>
<uc:KeyValueParameter Key="ID" Value="TEXT_READWRITE" />
<uc:KeyValueParameter Key="ScanToInput" Value="true" />
</uc:KeyValueList>
</Button.CommandParameter>
</Button>