//Registers a control type.
        internal static ControlType Register(AutomationIdentifierConstants.ControlTypes id, string programmaticName, string stId,
                                             AutomationProperty[] requiredProperties,
                                             AutomationPattern[] neverSupportedPatterns,
                                             AutomationPattern[][] requiredPatternsSets)
        {
            ControlType controlType = (ControlType)AutomationIdentifier.Register(UiaCoreTypesApi.AutomationIdType.ControlType, (int)id, programmaticName);

            controlType._stId = stId;
            controlType._requiredPatternsSets   = requiredPatternsSets;
            controlType._neverSupportedPatterns = neverSupportedPatterns;
            controlType._requiredProperties     = requiredProperties;
            return(controlType);
        }
 //Required patterns, never supported patterns and required properties are set to an empty array
 internal static ControlType Register(AutomationIdentifierConstants.ControlTypes id, string programmaticName, string stId)
 {
     return(ControlType.Register(id, programmaticName, stId, Array.Empty <AutomationProperty>(), Array.Empty <AutomationPattern>(), new AutomationPattern[0][]));
 }
 /// <summary>
 /// </summary>
 internal static ControlType Register(AutomationIdentifierConstants.ControlTypes id, string programmaticName)
 {
     return((ControlType)AutomationIdentifier.Register(UiaCoreTypesApi.AutomationIdType.ControlType, (int)id, programmaticName));
 }
示例#4
0
 //Never supported patterns and required patterns are set to an empty array
 internal static ControlType Register(AutomationIdentifierConstants.ControlTypes id, string programmaticName, string stId,
                                      AutomationProperty[] requiredProperties)
 {
     return(ControlType.Register(id, programmaticName, stId, requiredProperties, new AutomationPattern[0], new AutomationPattern[0][]));
 }