Class DefaultChildTypeAttribute
Attribute used to specify the default child type for a parent type.
Inheritance
Namespace: Syncfusion.Windows.Forms.Design
Assembly: Syncfusion.Shared.Base.dll
Syntax
public class DefaultChildTypeAttribute : Attribute
Remarks
A parent type designer, say TabControl for example, usually lets you add child types, TabPage in this case, during design-time. However, when you create custom types deriving from TabControl and TabPage, the designer needs to be informed about this change in "default child type" for your derived parent type. This attribute lets you declare this relationship.
Some of our components like TabControlExt and XPTaskBar use this attribute to declare their default child type. Their corresponding designers query this attribute before creating a new child instance. This way, when you derive custom types for the above Controls, you can specify the new default child type using this attribute on your parent type.
Constructors
DefaultChildTypeAttribute(Type)
Creates a new instance of the DefaultChildTypeAttribute specifying the child type.
Declaration
public DefaultChildTypeAttribute(Type childType)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | childType | An Type instance. |
Properties
ChildType
Returns the specified child Type.
Declaration
public Type ChildType { get; }
Property Value
| Type |
|---|
| System.Type |