Share via


_XDocument3.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.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

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

value = instance.IsDOMReadOnly
bool IsDOMReadOnly { get; }

Property value

Type: System.Boolean

Implements

_XDocument2.IsDOMReadOnly
_XDocument.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

Important

This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

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

_XDocument3 interface

_XDocument3 members

IsDOMReadOnly overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace