combit List & Label 27 - .NET Hilfe
combit.Reporting Namespace / PostCloneDesignerObjectEventArgs Klasse / Clone Eigenschaft
Beispiele


In diesem Thema
    Clone Eigenschaft
    In diesem Thema

    Stellt das kopierte Designer Objekt dar. Hiermit können etwaige selbst im Designer Objekt definierte Objekte/Members (bspw. eigene Listen etc.) in die neue Kopie des Designer Objektes kopiert werden.

    Syntax
    'Deklaration
     
    
    Public ReadOnly Property Clone As DesignerObject
    public DesignerObject Clone {get;}
    public:
    property DesignerObject^ Clone {
       DesignerObject^ get();
    }
    Beispiele
    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
    Anforderungen

    Plattformen: Windows 8.1 bis Windows 10 (Version 20H2 - 21H2), Windows 11 (21H2), Windows Server 2012 - 2022

    Siehe auch