Export (0) Print
Expand All

StrokeCollection.Replace Method (Stroke, StrokeCollection)

Replaces the specified Stroke with the specified StrokeCollection.

Namespace:  System.Windows.Ink
Assembly:  PresentationCore (in PresentationCore.dll)

member Replace : 
        strokeToReplace:Stroke * 
        strokesToReplaceWith:StrokeCollection -> unit

Parameters

strokeToReplace
Type: System.Windows.Ink.Stroke

The Stroke to replace.

strokesToReplaceWith
Type: System.Windows.Ink.StrokeCollection

The source StrokeCollection.

ExceptionCondition
ArgumentException

strokesToReplace is empty.

-or-

strokesToReplaceWith is empty.

-or-

A Stroke in strokesToReplaceWith is already in strokesToReplace.

The Replace method raises the StrokesChanged event.

The following example demonstrates how to replace the selected strokes on an InkCanvas with another StrokeCollection. This example assumes that there is an InkCanvas called inkCanvas1.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft