public void PropertyGridAccessibleObject_Ctor_Default() { using PropertyGrid propertyGrid = new PropertyGrid(); PropertyGrid.PropertyGridAccessibleObject accessibleObject = new PropertyGrid.PropertyGridAccessibleObject(propertyGrid); Assert.NotNull(accessibleObject.Owner); Assert.Equal(propertyGrid, accessibleObject.Owner); }
public void PropertyGridAccessibleObject_SupportsPattern(int pattern) { using PropertyGrid propertyGrid = new PropertyGrid(); propertyGrid.CreateControl(); using ComboBox comboBox = new ComboBox(); propertyGrid.SelectedObject = comboBox; PropertyGrid.PropertyGridAccessibleObject propertyGridAccessibleObject = new PropertyGrid.PropertyGridAccessibleObject(propertyGrid); // First child should be PropertyGrid toolbox. AccessibleObject firstChild = (AccessibleObject)propertyGridAccessibleObject.FragmentNavigate(UiaCore.NavigateDirection.FirstChild); // Second child entry should be PropertyGridView. AccessibleObject gridViewChild = (AccessibleObject)firstChild.FragmentNavigate(UiaCore.NavigateDirection.NextSibling); Assert.True(gridViewChild.IsPatternSupported((UiaCore.UIA)pattern)); }