--- title: "How to: Erase Ink on a Custom Control" ms.date: "03/30/2017" dev_langs: - "csharp" - "vb" helpviewer_keywords: - "custom controls [WPF], erasing ink on" - "ink [WPF], erasing on custom control" ms.assetid: d88c50f9-b4d8-4962-a28b-67d6a15a5fe0 --- # How to: Erase Ink on a Custom Control The determines whether the currently drawn stroke intersects another stroke. This is useful for creating a control that enables a user to erase parts of a stroke, the way a user can on an when the is set to . ## Example The following example creates a custom control that enables the user to erase parts of strokes. This example creates a control that contains ink when it is initialized. To create a control that collects ink, see [Creating an Ink Input Control](creating-an-ink-input-control.md). [!code-csharp[HowToEraseInk#1](~/samples/snippets/csharp/VS_Snippets_Wpf/HowToEraseInk/CSharp/InkEraser.cs#1)] [!code-vb[HowToEraseInk#1](~/samples/snippets/visualbasic/VS_Snippets_Wpf/HowToEraseInk/VisualBasic/InkEraser.vb#1)]