Share via


DrawingAttributes.Clone Metodo

Definizione

Copia l'oggetto DrawingAttributes.

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

Restituisce

Copia dell'oggetto DrawingAttributes.

Esempio

Nell'esempio seguente viene illustrato come copiare un DrawingAttributes oggetto.

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

Commenti

Il Clone metodo crea un nuovo DrawingAttributes oggetto e lo popola con gli stessi valori dell'oggetto corrente. Tutte le proprietà personalizzate vengono copiate anche.

Si applica a

Vedi anche