combit List & Label 25 - .NET Online Web Help
Clone Property
Example 


combit.ListLabel25 Namespace > PostCloneDesignerObjectEventArgs Class : Clone Property
The cloned Designer object. Custom defined objects/members in the Designer object (e.g. custom lists etc.) can be copied into a new copy of the Designer object with this property.
Syntax
'Declaration
 
Public ReadOnly Property Clone As DesignerObject
public DesignerObject Clone {get;}
public:
property DesignerObject^ Clone {
   DesignerObject^ get();
}
Example
class MyDesignerObject : DesignerObject
{
	// Custom member variables
	List<int> _lst = new List<int>();
	int _currentPrintingLineIndex = -1;
	bool _lastPage = false;
	// ...
	protected override void OnPostCloneDesignerObject(PostCloneDesignerObjectEventArgs e)
	{
		MyDesignerObject clone = (MyDesignerObject)e.Clone;

		clone._currentPrintingLineIndex = _currentPrintingLineIndex;
		clone._lastPage = _lastPage;
		clone._lst = _lst;
	}
	// ...
}
Class MyDesignerObject
	Inherits DesignerObject
	' Custom member variables
	Private _lst As New List(Of Integer)()
	Private _currentPrintingLineIndex As Integer = -1
	Private _lastPage As Boolean = False
	' ...
	Protected Overrides Sub OnPostCloneDesignerObject(e As PostCloneDesignerObjectEventArgs)
		Dim clone As MyDesignerObject = DirectCast(e.Clone, MyDesignerObject)

		clone._currentPrintingLineIndex = _currentPrintingLineIndex
		clone._lastPage = _lastPage
		clone._lst = _lst
	End Sub
	' ...
End Class
Requirements

Platforms: Windows 7 SP1 - Windows 10 Version 1909, Windows Server 2008 R2 - 2019

See Also

Reference

PostCloneDesignerObjectEventArgs Class
PostCloneDesignerObjectEventArgs Members