Click or drag to resize

ElementModelBasedOn Property

References another element from which the current element's parameters will be based.

Namespace:  Livit.Learn.Model
Assembly:  Livit.Learn.Model (in Livit.Learn.Model.dll) Version: 0.0.0.0
Syntax
C#
public string BasedOn { get; set; }

Property Value

Type: String
Remarks

Setting the BasedOn parameter will reference another element whose parameters to replicate, essentially making a duplicate of the previous item.

This allows to easily create multiple objects with the same parameters, and to modify those multiple objects by changing the parameters on the original object only.

Elements based on another will share all of that original element's parameters, unless explicitly stated otherwise. The elements are not linked after creation, and their parameters can be modified independently.

Examples
XML
<Element Id="BaseElement" Tooltip="Some tooltip I want many elements to have" IsClickable="true" />
<Element Id="Copy1" BasedOn="BaseElement" />
<Element Id="Copy2" BasedOn="BaseElement" />
<Element Id="Copy3" BasedOn="BaseElement" IsClickable="false" />
See Also