Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

StrokeCollection::Replace Method (StrokeCollection^, StrokeCollection^)

 

Replaces the specified StrokeCollection with a new StrokeCollection.

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

public:
void Replace(
	StrokeCollection^ strokesToReplace,
	StrokeCollection^ strokesToReplaceWith
)

Parameters

strokesToReplace
Type: System.Windows.Ink::StrokeCollection^

The destination StrokeCollection.

strokesToReplaceWith
Type: System.Windows.Ink::StrokeCollection^

The source StrokeCollection.

Exception Condition
ArgumentException

strokesToReplace is empty.

-or-

strokesToReplaceWith is empty.

-or-

A Stroke in strokesToReplaceWith is already in strokesToReplace.

-or-

The strokes in strokesToReplaceWith are not continuous.

The Replace method raises the StrokesChanged event for each Stroke it replaces.

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
Available since 3.0
Return to top
Show:
© 2017 Microsoft