If you inherit from the Stroke class and your stroke's appearance is based on a custom state, you must call the OnInvalidated method to raise the Invalidated event. The InkPresenter handles the Invalidated event and calls the DrawCore method.
The following example draws a Stroke either as a solid stroke or as a series of StylusPoint objects, depending on the Mode property. The example calls the OnInvalidated method, which in turn calls the DrawCore where the stroke is drawn.
Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)