public void GridEntryAccessibleObject_SupportsPattern(int pattern)
        {
            using PropertyGrid propertyGrid = new PropertyGrid();
            using ComboBox comboBox         = new ComboBox();
            propertyGrid.SelectedObject     = comboBox;
            GridEntry        defaultGridEntry = propertyGrid.GetDefaultGridEntry();
            GridEntry        parentGridEntry  = defaultGridEntry.ParentGridEntry; // Category which has item pattern.
            AccessibleObject accessibleObject = parentGridEntry.AccessibilityObject;

            Assert.True(accessibleObject.IsPatternSupported((UiaCore.UIA)pattern));
        }
        public void PropertyGridViewAccessibleObject_Supports_TablePattern(int pattern)
        {
            PropertyGrid propertyGrid = new PropertyGrid();
            ComboBox     comboBox     = new ComboBox();

            propertyGrid.SelectedObject = comboBox;

            var defaultGridEntry = propertyGrid.GetDefaultGridEntry();
            var parentGridEntry  = defaultGridEntry.ParentGridEntry; // Category which has item pattern.
            var accessibleObject = parentGridEntry.AccessibilityObject;

            Assert.True(accessibleObject.IsPatternSupported((UiaCore.UIA)pattern));
        }