Show All

# showMenuItem Attribute

Displays a menu item in the InfoPath View menu and adds a check mark next to the item when it is in use.

## Type

`xsf:xdYesNo`

## Parent Elements

Element | Description
--- | ---
view | Contains information about an InfoPath view.

## Definition

    <xsd:attribute name="showMenuItem" type="xsf:xdYesNo" use="optional"></xsd:attribute>

## Remarks

The showMenuItem attribute is an optional attribute of the view element. The default value is "yes".

If the showMenuItem attribute for a menu item in the View menu is set to "yes", the item appears in the View menu and has a check mark next to it when it is in use. The menu item appears with the caption that has been defined for it and in the order specified in the form definition file (.xsf). If the showMenuItem attribute is not present or is set to "no", the menu item does not appear in the View menu. Users can still add items to the View menu by customizing it, but such items will not display a check mark when they are in use.

Note This item is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Editions Service Pack 1 or later is not installed. Any form defined by a form definition file (.xsf) that includes this item cannot be opened in InfoPath when service pack features are disabled or unavailable.

## Example

The following is an example of the showMenuItem attribute as it is used in the view element:

    <xsf:view name="View 1" caption="First view" showMenuItem="yes">
       <xsf:mainpane transform="view1.xsl"></xsf:mainpane>
    </xsf:view>

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp