Table of Contents

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

binding ContentControlDataBinding

The binding.

value string

The 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

binding or value is null.

ContentControlBindingException

The XPath is outside the supported subset, the store item cannot be found, or the part could not be rewritten.