Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

AutomationPeer.GetPattern Method

When overridden in a derived class, gets an object that supports the requested pattern, based on PatternInterface input and the peer's implementation of known patterns.

Namespace:  System.Windows.Automation.Peers
Assembly:  System.Windows (in System.Windows.dll)

'Declaration
Public MustOverride Function GetPattern ( _
	patternInterface As PatternInterface _
) As Object

Parameters

patternInterface
Type: System.Windows.Automation.Peers.PatternInterface
A value from the PatternInterface enumeration.

Return Value

Type: System.Object
The object that implements the pattern interface; Nothing if this peer does not support this interface.

Notes to Inheritors

The initial implementation is empty. This method does not have a "Core" parallel method, you override GetPattern itself.

You are expected to return existing values from the PatternInterface enumeration, which correspond to pattern definitions in System.Windows.Automation.Provider. In cases where no existing pattern or provider interface matches, use null. Often this also suggests that GetAutomationControlType should return Custom.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

Show:
© 2017 Microsoft