InkPresenter::DetachVisuals Method (Visual^)
.NET Framework (current version)
Detaches the visual of the DynamicRenderer from the InkPresenter.
Assembly: PresentationFramework (in PresentationFramework.dll)
Parameters
- visual
-
Type:
System.Windows.Media::Visual^
The visual of the DynamicRenderer to detach.
| Exception | Condition |
|---|---|
| InvalidOperationException | 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
Available since 3.0
Show: