DetachVisuals Method

InkPresenter.DetachVisuals Method (Visual)


Detaches the visual of the DynamicRenderer from the InkPresenter.

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

public void DetachVisuals(
	Visual visual


Type: System.Windows.Media.Visual

The visual of the DynamicRenderer to detach.

Exception Condition

visual is not attached to the InkPresenter.

When the DrawingAttributes on a custom control changes, the visual of the DynamicRenderer must be re-attached to the InkPresenter. Call the DetachVisuals and AttachVisuals methods to re-attach the visual to the InkPresenter.

The following example re-attaches the visual of a DynamicRenderer to the InkPresenter whenever the DrawingAttributes on the changes. This example assumes that the AttributeChanged event is attached to the event handler.

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