Method WriteValue
- Namespace
- DocWright.Dom.ContentControls
- Assembly
- DocWright.Dom.dll
WriteValue(ContentControlDataBinding, string)
Writes a value through a binding, updating the custom XML part in memory.
public bool WriteValue(ContentControlDataBinding binding, string value)
Parameters
bindingContentControlDataBindingThe binding.
valuestringThe new value.
Returns
- bool
True when the bound node was found and updated.
Remarks
This updates the XML only. Use SetBoundValue(ContentControl, string) to keep the control's own content in step, which is what a document Word will reopen needs.
Exceptions
- ArgumentNullException
bindingorvalueis null.- ContentControlBindingException
The XPath is outside the supported subset, the store item cannot be found, or the part could not be rewritten.