Esempio n. 1
0
        public static void SelectItem(this PropertyGrid propertyGrid, string name)
        {
            if (!string.IsNullOrWhiteSpace(name))
            {
                GridItem gi = propertyGrid.EnumerateAllItems().First((item) =>
                                                                     item.PropertyDescriptor != null &&
                                                                     item.PropertyDescriptor.Name == name);

                // select it
                propertyGrid.Focus();
                gi.Select();
            }
        }