Share via


RibbonMenuButtonAutomationPeer.IExpandCollapseProvider.Collapse Method

Hides all items that are in the RibbonMenuButton that is associated with this RibbonMenuButtonAutomationPeer.

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 RibbonMenuButton is not enabled.

InvalidOperationException

The RibbonMenuButton does not contain any items.

Remarks

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

.NET Framework Security

See Also

Reference

RibbonMenuButtonAutomationPeer Class

Microsoft.Windows.Automation.Peers Namespace