Share via


RibbonMenuItemDataAutomationPeer.IExpandCollapseProvider.Collapse Method

Hides all items that are in the RibbonMenuItem that is associated with this RibbonMenuItemDataAutomationPeer.

Namespace:  Microsoft.Windows.Automation.Peers
Assembly:  RibbonControlsLibrary (in RibbonControlsLibrary.dll)

Syntax

'Declaration
Private Sub Collapse Implements IExpandCollapseProvider.Collapse
void IExpandCollapseProvider.Collapse()
private:
virtual void Collapse() sealed = IExpandCollapseProvider::Collapse
private abstract Collapse : unit -> unit 
private override Collapse : unit -> unit 
JScript does not support explicit interface implementations.

Implements

IExpandCollapseProvider.Collapse()

Exceptions

Exception Condition
ElementNotEnabledException

The RibbonMenuItem is not enabled.

ElementNotAvailableException

The RibbonMenuItem is virtualized.

InvalidOperationException

The RibbonMenuItem does not contain any items.

-or-

The RibbonMenuItem is not available.

Remarks

This member is an explicit interface member implementation. It can be used only when the RibbonMenuItemDataAutomationPeer instance is cast to an IExpandCollapseProvider interface.

.NET Framework Security

See Also

Reference

RibbonMenuItemDataAutomationPeer Class

Microsoft.Windows.Automation.Peers Namespace