DrawingAttributes.Clone Método

Definição

Copia o DrawingAttributes objeto.

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

Devoluções

Uma cópia do DrawingAttributes objeto.

Exemplos

O exemplo seguinte demonstra como copiar um DrawingAttributes objeto.

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

Observações

O Clone método cria um novo DrawingAttributes objeto e preenche-o com os mesmos valores do objeto atual. Quaisquer propriedades personalizadas também são copiadas.

Aplica-se a

Ver também