Metadata commonly used in control development

Source: Internet
Author: User
Bindable
This feature indicates whether a property can be bound to a valid data source. A boolean value is usually used for setting. For example, Bindable (true ). If the value true is used to mark the attribute, it indicates that the attribute can be bound to a valid data source and a notification of attribute change should be triggered.

Browsable
Specify whether the property should be displayed in the property browser and set it with a Boolean value. In general, the function property and the property that you want to display in the property browser are set to browsable (true ), the read-only attributes and those that do not want to be seen in the property browser are set to browsable (false ).

Category
Specifies the category of a property that is displayed by group in the property browser. This design-time feature helps the visual editor to logically group attributes. Usually divided into: appearance (appearance), behavior (behavior), layout (layout), data (data), Action (Action), keyboard (key) and mouse (Mouse. You can also customize the Group category.

Description
Specifies the text description of the property displayed below the property browser.

Designerserializationvisibility
Whether or not the attribute is specified and howCodeThe value is the enumerated value of designerserializationvisibility. There are three setting methods: designerserializationvisibility (designerserializationvisibility. Hidden) to specify serializationProgramThe property value should not be serialized; designerserializationvisibility (designerserializationvisibility. Visible) specifies the value of the serialization property that should be allowed by the serialization program;
Designerserializationvisibility (designerserializationvisibility. Content) specifies that the serialization program should serialize the property content, not the property itself. This field is read-only .. Visible is its default value.

Notifyparentproperty
Indicates that the parent attribute will be notified when the attribute value applied to this feature is modified. In other words, if the parent attribute of an attribute should be notified when the attribute value is changed, the policyparentproperty attribute will be applied to the attribute. A boolean value is usually used for setting.

In addition to the above design-time features, there are also some common design-time features that are declared before the class that contains the attribute. Generally, they are applied to the declaration process of classes that contain complex attributes of sub-attributes. Therefore, it is significant to declare complex attributes, as listed below:
Parsechildren
This feature indicates whether the XML elements nested in the server control tag should be regarded as attributes or child controls when the control is declared on the page. Generally, there are two declaration Methods: ① parsechildren (true) indicates that the child XML element is used as the Child control of the server control for analysis; ② parsechildren (bool childrenasproperty, string defaultproperty ), the Boolean parameters in childrenasproperty and method ① have the same meaning. defaultproperty defines the sub-control as the set property of the server control by default.

Persistchildren
This feature indicates whether the child control of the server control should be maintained as an internal nested control during design. If this feature is persistchildren (true), the Child control of the server control is marked as a nested Server Control. If it is persistchildren (false), the attributes of the control are kept as nested elements.

Persistencemode
Specifies how to maintain the server control property or event to the metadata property of the ASP. NET page. There are four enumeration settings: ① persistencemode (persistencemode. attribute), specifying attribute or event persistence as a feature; ② persistencemode (persistencemode. encodedinnerdefaultproperty), specifies the property as the unique internal text of the server control, and the property value is HTML encoded. This can only be specified for strings; ③ persistencemode (persistencemode. innerdefaultproperty), specifies the attribute to be kept as internal text in the server control, also indicates that this attribute is defined as the default attribute of the element, only one attribute can be specified as the default attribute; ④ persistencemode (persistencemode. innerproperty), specifying properties to be kept as nested tags in the server control, which is usually used for complex objects that have their own persistence attributes.

Defaultproperty
Specify the default property of the server control, for example, [defaultproperty ("myproperty")].

Typeconverter
Specifies the type of the converter used to bind the property. Classes used for conversion must be inherited from typeconverter. Use the convertertypename attribute to obtain the class name that provides data conversion for the object bound to this feature.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.