Allows you to customize properties of items created by an end-user at runtime in Customization Mode.
public event EventHandler<LayoutControlInitNewElementEventArgs> InitNewElement
Public Event InitNewElement As EventHandler(Of LayoutControlInitNewElementEventArgs)
The InitNewElement event's data class is LayoutControlInitNewElementEventArgs. The following properties provide information specific to this event:
|Element||Gets the created layout element.|
An end-user can add new items (e.g. groups) in Customization Mode, provided that the LayoutControl.AllowNewItemsDuringCustomization and LayoutControl.AllowAvailableItemsDuringCustomization properties are set to true. See the LayoutControl.AllowNewItemsDuringCustomization topic to learn more.
The InitNewElement event fires after an item has been created by a user. Handle the event to customize the item's properties. The created item can be accessed via the event's Element parameter.
When saving/loading layouts to a data store, only properties that can be changed by an end-user during layout customization are stored/restored. If you need to save/load custom properties, handle the LayoutControl.WriteElementToXML and LayoutControl.ReadElementFromXML events.