/// <summary>Allows the property grid drop down.</summary> /// <param name="context">The context for the type.</param> /// <param name="provider">The service provider.</param> /// <param name="value">The value that the object has.</param> /// <returns></returns> public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { var wfes = provider.GetService( typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (wfes == null) { if (value != null) { return(value); } } var setKey = new SetKey((Key)value); if (wfes != null) { wfes.DropDownControl(setKey); } value = setKey.Key; return(value); }
/// <summary>Allows the property grid drop down.</summary> /// <param name="context">The context for the type.</param> /// <param name="provider">The service provider.</param> /// <param name="value">The value that the object has.</param> /// <returns></returns> public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value) { var wfes = provider.GetService( typeof (IWindowsFormsEditorService)) as IWindowsFormsEditorService; if (wfes == null) if (value != null) return value; var setKey = new SetKey((Key) value); if (wfes != null) wfes.DropDownControl(setKey); value = setKey.Key; return value; }