RibbonMenuItemDataAutomationPeer.GetPattern Method
Gets the control pattern for the RibbonTab that is associated with the RibbonMenuItemDataAutomationPeer.
Namespace: Microsoft.Windows.Automation.Peers
Assembly: RibbonControlsLibrary (in RibbonControlsLibrary.dll)
Syntax
'Declaration
Public Overrides Function GetPattern ( _
patternInterface As PatternInterface _
) As Object
public override Object GetPattern(
PatternInterface patternInterface
)
public:
virtual Object^ GetPattern(
PatternInterface patternInterface
) override
abstract GetPattern :
patternInterface:PatternInterface -> Object
override GetPattern :
patternInterface:PatternInterface -> Object
public override function GetPattern(
patternInterface : PatternInterface
) : Object
Parameters
- patternInterface
Type: System.Windows.Automation.Peers.PatternInterface
A value enumeration that specifies the control pattern.
Return Value
Type: System.Object
An object that supports the control pattern if patternInterface is a supported value; otherwise, nulla null reference (Nothing in Visual Basic).
Remarks
If one of the following cases occurs, this method returns an object that supports the specified control pattern.
patternInterface equals ExpandCollapse and the RibbonMenuItem that is associated with this RibbonMenuItemDataAutomationPeer has child objects.
patternInterface equals Invoke and the RibbonMenuItem that is associated with this RibbonMenuItemDataAutomationPeer does not have child objects.
patternInterface equals Toggle and the RibbonMenuItem that is associated with this RibbonMenuItemDataAutomationPeer has its checkable property set to true.
patternInterface equals Transform and the RibbonMenuItem that is associated with this RibbonMenuItemDataAutomationPeer can be resized.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.