wpf_set_property
Live-edit a WPF dependency property at runtime to test UI changes without rebuilding; values are converted to the property type and changes can be reverted.
Instructions
Live-edit a dependency property on an element at runtime, to test whether a planned UI change is effective without rebuilding. The value is a string converted to the property's type: e.g. property_name='Margin' value='20,0,20,0', property_name='Visibility' value='Collapsed', property_name='Background' value='Red' (or '#FF0000'), property_name='Width' value='300', value='{null}' for null. Returns the coerced value read back and what previously held the property (Binding/Local/Unset). Setting a data-bound property replaces the binding with a local value; wpf_revert_property restores it. Pair with wpf_capture_screenshot to see the effect, then revert. STATE-CHANGING (reversible via wpf_revert_property). Target by exactly one of element_handle or automation_id (exact, case-sensitive AutomationProperties.AutomationId). Use root_handle with automation_id to scope lookup; missing or duplicate IDs fail before input.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| root_handle | No | ||
| automation_id | No | ||
| property_name | Yes | ||
| element_handle | No |