_XDocument4.IsDOMReadOnly property

Gets a value that indicates whether the data in the underlying XML document of a Microsoft InfoPath form has been placed in a read-only state.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property IsDOMReadOnly As Boolean
    Get
'Usage
Dim instance As _XDocument4
Dim value As Boolean

value = instance.IsDOMReadOnly
bool IsDOMReadOnly { get; }

Property value

Type: System.Boolean
Returns Boolean.

Implements

_XDocument3.IsDOMReadOnly

Remarks

If the IsDOMReadOnly property is true, data in the form's underlying XML document is in a read-only state and cannot be changed. If false, the data in the form's underlying XML document can be changed.

To determine whether the form has been placed in a read-only state, use the IsReadOnly property

The data in a form's XML document will be placed in a read-only state in the following scenarios:

  • The form is digitally signed

  • The form is in Reduced Functionality Mode (RFM) mode

  • During an OnBeforeChange event

  • During an OnValidate event

  • During an undo or redo operation

Examples

In the following example, the IsDOMReadOnly property of the XDocument object is used to determine whether data in the form's underlying XML document has been placed in a read-only state. If it has, a return statement is used to exit the event handler.

[InfoPathEventHandler(MatchPath="/my:myFields/my:field1", EventType=InfoPathEventType.OnAfterChange)]
public void field1_OnAfterChange(DataDOMEvent e)
{
 // Determine whether the XML DOM is read-only.
 if (thisXDocument.IsDOMReadOnly)
  return;

 // Continue normal processing...
}

See also

Reference

_XDocument4 interface

_XDocument4 members

IsDOMReadOnly overload

Microsoft.Office.Interop.InfoPath namespace