Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Editor attribute specifies the GUI editor that will be used in the property grid for this property. This is equivalent to placing an [EditorAttribute] on a code property. UITypeEditors are marked as deprecated and will be removed in a future version.

EditorBase

The EditorBase attribute specifies the base type for the editor. If none is specified, then UITypeEditor is assumed. UITypeEditors are marked as deprecated and will be removed in a future version.

Serializer

The Serializer attribute specifies the IPropertySerializer type to use when serializing the property's values. This is equivalent to using a [PropertySerializerAttribute] on a code property.

...

Declaring a property from code is essentially like creating a property in any class. The most notable options using Attributes to help you describe your property, it's location, and it's editor.

Example:
Code Block
xml
xml

private string aliasFilePath;

  [Editor(typeof(System.Windows.Forms.Design.FileNameEditor), typeof(System.Drawing.Design.UITypeEditor))]
  [Category("01. General")]
  [Optional]
  [DefaultValue("")]
  [Description("Optional File Path to a table/object alias file.")]
  public string AliasFilePath
  {
   get {return this.aliasFilePath;}
   set {this.aliasFilePath = value;}
  }

...