InkPresenter.AttachVisuals(Visual, DrawingAttributes) 메서드

정의

DynamicRenderer의 비주얼을 InkPresenter에 연결합니다.

public:
 void AttachVisuals(System::Windows::Media::Visual ^ visual, System::Windows::Ink::DrawingAttributes ^ drawingAttributes);
public void AttachVisuals (System.Windows.Media.Visual visual, System.Windows.Ink.DrawingAttributes drawingAttributes);
member this.AttachVisuals : System.Windows.Media.Visual * System.Windows.Ink.DrawingAttributes -> unit
Public Sub AttachVisuals (visual As Visual, drawingAttributes As DrawingAttributes)

매개 변수

visual
Visual

DynamicRenderer의 비주얼입니다.

drawingAttributes
DrawingAttributes

동적으로 렌더링되는 잉크의 모양을 지정하는 DrawingAttributes입니다.

예외

visual이 시각적 트리에 이미 연결된 경우

예제

다음 예제에서는 시각적 개체를 연결 하는 방법에 설명 하 고 DrawingAttributesDynamicRendererInkPresenter합니다.

// Create a DrawingAttributes to use for the 
// DynamicRenderer.
DrawingAttributes inkDA = new DrawingAttributes();
inkDA.Width = 5;
inkDA.Height = 5;
inkDA.Color = Colors.Purple;

// Add a dynamic renderer plugin that 
// draws ink as it "flows" from the stylus
DynamicRenderer dynamicRenderer1 = new DynamicRenderer();
dynamicRenderer1.DrawingAttributes = inkDA;

this.StylusPlugIns.Add(dynamicRenderer1);
inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual,
    dynamicRenderer1.DrawingAttributes);
' Create a DrawingAttributes to use for the 
' DynamicRenderer.
Dim inkDA As New DrawingAttributes()
inkDA.Width = 5
inkDA.Height = 5
inkDA.Color = Colors.Purple

' Add a dynamic renderer plugin that 
' draws ink as it "flows" from the stylus
Dim dynamicRenderer1 As New DynamicRenderer()
dynamicRenderer1.DrawingAttributes = inkDA

Me.StylusPlugIns.Add(dynamicRenderer1)
inkPresenter1.AttachVisuals(dynamicRenderer1.RootVisual, dynamicRenderer1.DrawingAttributes)

설명

시각적 개체를 연결을 DynamicRendererInkPresenter 를 동적으로 컨트롤에서 잉크를 렌더링 합니다.

적용 대상