DrawingAttributes.Clone Methode

Definitie

Kopieert het DrawingAttributes object.

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

Retouren

Een kopie van het DrawingAttributes object.

Voorbeelden

In het volgende voorbeeld ziet u hoe u een DrawingAttributes object kopieert.

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

Opmerkingen

Met Clone de methode wordt een nieuw DrawingAttributes object gemaakt en gevuld met dezelfde waarden als het huidige object. Eventuele aangepaste eigenschappen worden ook gekopieerd.

Van toepassing op

Zie ook