Programming Microsoft Infopath: A Developers Guide

UI Object

The UI ( User Interface) object provides methods for displaying custom dialog boxes to users as they complete a form. The UI object supports the properties and methods shown in Table A.14.

Table A.14: Properties and Methods of The UI Object.

Name

Security Level

Description

Alert Method

2

Displays a message box with a custom text message and an OK button

ShowMailItem Method

2

Creates an e-mail message using the system default e-mail editor and attaches the current InfoPath form to the message

ShowModalDialog Method

3

Displays a custom modal dialog box that is implemented within an HTML form attached to the current solution file

ShowSignatureDialog Method

2

Displays the Digital Signature dialog box for forms that have been enabled for signatures

Note  

You can insert carriage returns into the text of the custom message by using the standard \n characters .

The following example shows how to use the ShowMailItem method to create a custom e-mail message:

XDocument.UI.ShowMailItem("jackb@mycompany.com","","","Please Approve the following Expense Form");

Категории