_XDocument2.Language property

Gets or sets a form's default language code.

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

Syntax

'Declaration
Property Language As String
    Get
    Set
'Usage
Dim instance As _XDocument2
Dim value As String

value = instance.Language

instance.Language = value
string Language { get; set; }

Property value

Type: System.String

Implements

_XDocument.Language

Remarks

The language settings for an InfoPath form can also be accessed using the LanguageSettings property.

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 Language property of the XDocument object is used to display a form's current language setting in a message box:

thisXDocument.UI.Alert("The current language is: " + thisXDocument.Language);

See also

Reference

_XDocument2 interface

_XDocument2 members

Language overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace