Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Work Tasks

Attributing Properties

  • Last UpdatedJan 20, 2022
  • 2 minute read

Attributing properties is defining a custom property of a custom control to render the property in the Property pages and the forms ViewModel.

Attributing properties includes defining:

Designer Property

Designer property determines the location of a custom property in the Property page of a custom control.

[DesignerProperty(int index, Categories categoryType, CoreDesigner designerType)]

where index is the property index, categoryType is the property tab, and designerType is the forms type.

Example

// Setting the location of the custom property

// in the Behaviour tab of the Property page.

[DesignerProperty(773000, Categories.Behaviour, CoreDesigner.NextGenDesigner)]

OR

[DesignerProperty(int index, Categories categoryType, Type controlProperty, string propertyDetails)]

where index is the property index, categoryType is the property tab, controlProperty is the property type for the IControlProperty, and string is the property details. The string is an associated property name for the form XML definition. To generate the string, create a form with the required controls configured with the required properties and then export the form.

Note: We do not recommend using lookups and data grid controls as the forms will be dependent on the repository.

Example

// Setting the location of the custom property

// in the Behaviour tab of the Property page.

public string DataFormXml

{

get

{

// Code to return the form XML definition

}

}

[DesignerProperty(773000, Categories.Behaviour, typeof(GridProperty), "DataFormXml")]

Binding Attribute

Binding attribute determines how a custom property is rendered in the client-side JavaScript ViewModel.

[BindingAttribute(PropertyIndex, "<Namespace>.<ClassName>", BindingPropertyName = "<ViewModelPropertyName>, IsObservable = <TrueFalse>")]

Example

// Custom binding is defined under MyIntegerBindingProperty class

// located at MyNamespace.MyIntegerBindingProperty class path.

[BindingAttribute(882995, true, "MyNamespace.MyIntegerBindingProperty")]

Note:
- New index should be defined for each custom property.
- Index value for a custom property should be higher than the defined property index values.
- Properties for custom controls are cached in IIS. Therefore, we recommend to reset the IIS to clear the IIS cache when new properties are added or existing properties are changed.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in