InkPresenter.DetachVisuals(Visual) 메서드

정의

DynamicRenderer의 비주얼을 InkPresenter에서 분리합니다.

public:
 void DetachVisuals(System::Windows::Media::Visual ^ visual);
public void DetachVisuals (System.Windows.Media.Visual visual);
member this.DetachVisuals : System.Windows.Media.Visual -> unit
Public Sub DetachVisuals (visual As Visual)

매개 변수

visual
Visual

분리할 DynamicRenderer의 비주얼입니다.

예외

visualInkPresenter에 연결되어 있지 않은 경우

예제

시각적 개체를 다시 연결 하는 다음 예제는 DynamicRendererInkPresenter 때마다는 DrawingAttributes 변경. 이 예에서는 가정 하는 AttributeChanged 이벤트는 이벤트 처리기에 연결 합니다.

void DrawingAttributesChanged(object sender, PropertyDataChangedEventArgs e)
{
    // Reattach the visual of the DynamicRenderer to the InkPresenter 
    // whenever the DrawingAttributes change.
    presenter.DetachVisuals(renderer.RootVisual);
    presenter.AttachVisuals(renderer.RootVisual, renderer.DrawingAttributes);
}
Private Sub DrawingAttributesChanged(ByVal sender As Object, ByVal e As PropertyDataChangedEventArgs)

    ' Reattach the visual of the DynamicRenderer to the InkPresenter 
    ' whenever the DrawingAttributes change.
    presenter.DetachVisuals(renderer.RootVisual)
    presenter.AttachVisuals(renderer.RootVisual, renderer.DrawingAttributes)

End Sub

설명

경우는 DrawingAttributes 시각적 개체의 사용자 지정 컨트롤 변경 내용에는 DynamicRenderer 에 다시 연결 해야는 InkPresenter합니다. 호출 된 DetachVisualsAttachVisuals 시각적 개체를 다시 연결 하는 방법의 InkPresenter.

적용 대상