AutomationPeer::GetPattern Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
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.
Assembly: System.Windows (in System.Windows.dll)
Parameters
- patternInterface
- Type: System.Windows.Automation.Peers::PatternInterface
A value from the PatternInterface enumeration.
Return Value
Type: System::ObjectThe object that implements the pattern interface; nullptr if this peer does not support this interface.
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.