Skip to main content
A newer version of this page is available. .

LayoutControl.RegisterFixedItemType(Type) Method

Registers the specified ‘fixed’ item for runtime use in the LayoutControl.

Namespace: DevExpress.XtraLayout

Assembly: DevExpress.XtraLayout.v19.2.dll

Declaration

public virtual void RegisterFixedItemType(
    Type itemType
)

Parameters

Name Type Description
itemType Type

The type of the ‘fixed’ item to be registered.

Remarks

Predefined items that are displayed first and painted bold in the Customization Form are called “fixed”. These items are not instances, but rather types of items. When any of the ‘fixed’ items is dragged and dropped from the Customization Form onto the Layout Control, an instance of the corresponding item is created within the layout. The item is not hidden from the Customization Form. The LayoutControl supports the following ‘fixed’ items: Empty Space Items, Label, Separator and Splitter.

The RegisterFixedItemType method allows you to register a custom ‘fixed’ item for runtime use. First, create a ‘fixed’ item by deriving it from the LayoutControlItem class and implementing the DevExpress.XtraLayout.IFixedLayoutControlItem interface. Then, register the ‘fixed’ item with the RegisterFixedItemType method. See How to: Create custom ‘fixed’ item, for an example.

When registering multiple custom ‘fixed’ items, wrap the registration code with the LayoutControl.HiddenItems.BeginRegistration and LayoutControl.HiddenItems.EndRegistration method pair to avoid superfluous updates.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the RegisterFixedItemType(Type) method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also