public PropertyNode CreatePropertyNode(PropertyDescriptor item, object targetComponent, IPropertyGridLocalizer localizer, PropertySettings settings, bool isMultiObject) { PropertyNode node = null; if (item.PropertyType == typeof(Color)) node = new PropertyNodeColor(item); else if (item.PropertyType == typeof(bool)) node = new PropertyCheckBoxNode(item); else if (settings != null && settings.PropertyNodeType == ePropertyNodeType.RadioButtonList) node = new PropertyOptionListNode(item); else node = new PropertyNode(item); node.IsMultiObject = isMultiObject; node.NodesIndent = _ChildPropertiesIndent; node.ImageAlignment = eCellPartAlignment.FarCenter; string name = localizer.GetPropertyName(item.Name); if (string.IsNullOrEmpty(name)) name = item.DisplayName; node.Text = name; node.TargetComponent = targetComponent; Cell cell = new Cell(); cell.Selectable = false; node.Cells.Add(cell); node.PropertySettings = settings; return node; }
internal void OnPropertyIsEditingChanged(PropertyNode node) { if (node.IsEditing) _EditedNode = node; else _EditedNode = null; }