VegaRise.NET
Back to DOM

BaseElementClass

Definition

Namespace
DOM.Abstracts
Assembly
DOM.dll

Base implementation for all DOM elements. Tracks element status and provides cloning helpers.

Remarks

is the root of the DOM element hierarchy. It provides two core capabilities used by every concrete element in the library: BaseElement Concrete elements rarely need to interact with this class directly; they simply inherit from it (often indirectly, through,,, or ) and rely on the base plumbing. BaseStyle BaseFill BaseGraphicElement BaseTableElement Change tracking via — the status is computed on demand by comparing the element's current property values against a snapshot captured when the element entered its or state. Status NoChange New Cloning via and — a shallow property-by-property copy that produces an independent instance of the same runtime type. Clone CloneObject`(`)

Examples

csharp
1// 1. Check the status of a freshly created element
2var font = new FontPart("Calibri", 12.0);
3Console.WriteLine(font.Status); // New
4
csharp
1// 2. Clone an element to produce an independent instance
2var font = new FontPart("Calibri", 12.0);
3var copy = (FontPart)font.Clone();
4
csharp
1// 3. Move an element out of the "New" state so change tracking starts working
2font.Status = ElementStatus.NoChange;
3font.FontName = "Arial"; // now Status will report Updated on the next read
4
csharp
1// 4. Explicitly capture the current values as the baseline
2font.CaptureInitialValues();
3

Properties

Gets or sets the current status of this element.

Assigning or causes the current property values to be captured as the new baseline, so subsequent changes can be detected as . New NoChange Updated

Methods

Captures the current public property values of this element as the change-tracking baseline.

Creates a shallow clone of this element.

Creates a new instance of the same runtime type as and copies all readable/writable public properties. original

VegaRiseVDocs.NET

Reset Password

Enter your email and we'll send you a link to reset your password.

Remember your password? Sign in