DrawingAttributes.Clone 메서드

정의

개체를 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

반품

개체의 복사본입니다 DrawingAttributes .

예제

다음 예제에서는 개체를 복사 DrawingAttributes 하는 방법을 보여 줍니다.

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

설명

메서드는 CloneDrawingAttributes 개체를 만들고 현재 개체와 동일한 값으로 채웁니다. 모든 사용자 지정 속성도 복사됩니다.

적용 대상

추가 정보