Jump to: navigation, search

EditPropertyValueCommand


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.

IC Attention.pngNote that a Save and Commit on the ContentViewModel is automatically triggered once the edit is confirmed.
IC Hint square.pngIf 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.

Example:

<Button Command="{Binding EditPropertyValueCommand}" Text="Edit">
        <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>


A toggle button to do from within the string edit dialogue was added to the standard UI.