Difference between revisions of "EditPropertyValueCommand"
m (removed double heading) |
(→Scan to Input) |
||
| (3 intermediate revisions by 2 users not shown) | |||
| Line 9: | Line 9: | ||
== Command Properties == | == Command Properties == | ||
* ID: String. The ID of the property to be edited. | * ID: String. The ID of the property to be edited. | ||
| − | |||
Example: | Example: | ||
| + | <source lang = "xml"> | ||
| + | <Button Command="{Binding EditPropertyValueCommand}" Text="Edit"> | ||
| + | <Button.CommandParameter> | ||
| + | <uc:KeyValueList> | ||
| + | <uc:KeyValueParameter Key="ID" Value="TEXT_READWRITE" /> | ||
| + | </uc:KeyValueList> | ||
| + | </Button.CommandParameter> | ||
| + | </Button> | ||
| + | </source> | ||
| + | |||
| + | === Scan to Input === | ||
| + | * ScanToInput: bool. Default value is false. | ||
| + | |||
| + | A custom button can be added to the UI to trigger the scanning control by default when the string edit window is opened, simply by adding the following KeyValueParameter: | ||
<source lang = "xml"> | <source lang = "xml"> | ||
<Button Command="{Binding EditPropertyValueCommand}" Text="ScanToEdit"> | <Button Command="{Binding EditPropertyValueCommand}" Text="ScanToEdit"> | ||
| Line 22: | Line 35: | ||
</Button> | </Button> | ||
</source> | </source> | ||
| + | |||
| + | |||
| + | {{Version/MobileSince|5.2}} A toggle button to do from within the [[Editors#String_value_editor|string edit dialogue]] was added to the standard UI. | ||
[[Category:XAML|EditPropertyValueCommand]] | [[Category:XAML|EditPropertyValueCommand]] | ||
Latest revision as of 08:46, 3 August 2026
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.
Example:
<Button Command="{Binding EditPropertyValueCommand}" Text="Edit">
<Button.CommandParameter>
<uc:KeyValueList>
<uc:KeyValueParameter Key="ID" Value="TEXT_READWRITE" />
</uc:KeyValueList>
</Button.CommandParameter>
</Button>
<Button.CommandParameter>
<uc:KeyValueList>
<uc:KeyValueParameter Key="ID" Value="TEXT_READWRITE" />
</uc:KeyValueList>
</Button.CommandParameter>
</Button>
Scan to Input
- ScanToInput: bool. Default value is false.
A custom button can be added to the UI to trigger the scanning control by default when the string edit window is opened, simply by adding the following KeyValueParameter:
<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>
A toggle button to do from within the string edit dialogue was added to the standard UI.
