combit List & Label 30 - .NET Help
combit.Reporting Namespace / PostCloneDesignerObjectEventArgs Class / Clone Property
Example


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
 
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 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
.NET: .NET Framework 4.8, .NET 6, .NET 8, .NET 9

See Also