Versions Compared

Key

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

...

Code Block
languagehtml/xml
<%@ Property Name="ClassName" Type="System.String" Category="Context" Description="The name of the class to be generated." %>

Property Directive Attributes

The Property directive has nine possible attributes. The Name and Type attributes are required, and the other attributes are optional.

...

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 the CodeBehind

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;}
  }

...