DrawingAttributes.Clone Methode

Definition

Kopiert das DrawingAttributes-Objekt.

public:
 virtual System::Windows::Ink::DrawingAttributes ^ Clone();
public virtual System.Windows.Ink.DrawingAttributes Clone ();
abstract member Clone : unit -> System.Windows.Ink.DrawingAttributes
override this.Clone : unit -> System.Windows.Ink.DrawingAttributes
Public Overridable Function Clone () As DrawingAttributes

Gibt zurück

Eine Kopie des DrawingAttributes-Objekts.

Beispiele

Im folgenden Beispiel wird das Kopieren eines DrawingAttributes -Objekts veranschaulicht.

void CopyAttributes(Stroke someStroke)
{
    DrawingAttributes attributes = new DrawingAttributes();
    attributes.Color = Colors.Red;
    someStroke.DrawingAttributes = attributes.Clone();
}
Sub CopyAttributes(ByVal someStroke As Stroke)
    Dim attributes As New DrawingAttributes()
    attributes.Color = Colors.Red
    someStroke.DrawingAttributes = attributes.Clone()
End Sub

Hinweise

Die Clone -Methode erstellt ein neues DrawingAttributes -Objekt und füllt es mit den gleichen Werten wie das aktuelle Objekt auf. Alle benutzerdefinierten Eigenschaften werden ebenfalls kopiert.

Gilt für:

Weitere Informationen