Redigera

Dela via


ControlDesigner.RegisterClone(Object, Object) Method

Definition

Registers internal data in a cloned control.

public:
 void RegisterClone(System::Object ^ original, System::Object ^ clone);
public void RegisterClone (object original, object clone);
member this.RegisterClone : obj * obj -> unit
Public Sub RegisterClone (original As Object, clone As Object)

Parameters

original
Object

The control associated with the control designer.

clone
Object

The cloned copy of the associated control.

Exceptions

original is null.

-or-

clone is null.

Remarks

Whenever an item is cloned, there might be some internal data structures, such as meta: attributes, that should be included in the cloned control by the control designer. A page developer might add meta: attributes to the markup of a control and there is no way, nor is there a reason, for the control to distinguish what those tags might be. Therefore, if your control designer provides a way to edit complex properties or formats before applying changes to a page, you would create a clone of the control, pass both the original control and the clone to this RegisterClone method, and then, when the changes are persisted to the tag, all meta: attributes are also persisted.

Applies to

See also