Guest User

Untitled

a guest
Jun 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public class ConverterSample : System.ComponentModel.StringConverter
  2. {
  3. public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
  4. {
  5. //true means show a combobox
  6. return true;
  7. }
  8.  
  9. public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
  10. {
  11. return false;
  12. }
  13.  
  14.  
  15. public override TypeConverter.StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
  16. {
  17. return new StandardValuesCollection(new List<string>(){"Stack", "overflow", "rules");
  18.  
  19. }
Add Comment
Please, Sign In to add comment