/// <summary> /// Gets a UI type editor for the given property descriptor and context</summary> /// <param name="descriptor">Property descriptor</param> /// <param name="context">Type descriptor context</param> /// <returns>UI type editor for the given property descriptor and context</returns> public static UITypeEditor GetUITypeEditor( PropertyDescriptor descriptor, ITypeDescriptorContext context) { UITypeEditor editor = descriptor.GetEditor(typeof(UITypeEditor)) as UITypeEditor; if (editor == null) { if (StandardValuesUIEditor.CanCreateStandardValues(descriptor, context)) { editor = new StandardValuesUIEditor(descriptor); } else { Type type = descriptor.PropertyType; editor = TypeDescriptor.GetEditor(type, typeof(UITypeEditor)) as UITypeEditor; } } return editor; }
/// <summary> /// Gets a UI type editor for the given property descriptor and context</summary> /// <param name="descriptor">Property descriptor</param> /// <param name="context">Type descriptor context</param> /// <returns>UI type editor for the given property descriptor and context</returns> public static UITypeEditor GetUITypeEditor( PropertyDescriptor descriptor, ITypeDescriptorContext context) { UITypeEditor editor = descriptor.GetEditor(typeof(UITypeEditor)) as UITypeEditor; if (editor == null) { if (StandardValuesUIEditor.CanCreateStandardValues(descriptor, context)) { editor = new StandardValuesUIEditor(descriptor); } else { Type type = descriptor.PropertyType; editor = TypeDescriptor.GetEditor(type, typeof(UITypeEditor)) as UITypeEditor; } } return(editor); }
public StandardValuesListBox(StandardValuesUIEditor editor) { m_editor = editor; base.BorderStyle = BorderStyle.None; base.DrawMode = DrawMode.OwnerDrawVariable; }
public StandardValuesListBox(StandardValuesUIEditor editor) { m_editor = editor; base.BorderStyle = BorderStyle.None; base.DrawMode = DrawMode.OwnerDrawVariable; }