AttachVisuals Method

InkPresenter.AttachVisuals Method (Visual, DrawingAttributes)


Attaches the visual of a DynamicRenderer to an InkPresenter.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public void AttachVisuals(
	Visual visual,
	DrawingAttributes drawingAttributes


Type: System.Windows.Media.Visual

The visual of a DynamicRenderer.

Type: System.Windows.Ink.DrawingAttributes

The DrawingAttributes that specifies the appearance of the dynamically rendered ink.

Exception Condition

visual is already attached to a visual tree.

Attach the visual of a DynamicRenderer to the InkPresenter to dynamically render ink on your control.

The following example demonstrates how to attach the visual and DrawingAttributes of a DynamicRenderer to an InkPresenter.

.NET Framework
Available since 3.0
Return to top
© 2015 Microsoft