InkCanvas.Strokes Property

 

Gets or sets the collection of ink Stroke objects collected by the InkCanvas.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

member Strokes : StrokeCollection with get, set

Property Value

Type: System.Windows.Ink.StrokeCollection

The collection of Stroke objects contained within the InkCanvas.

Identifier field

StrokesProperty

Metadata properties set to true

None

The following example demonstrates how to use two StrokeCollection objects for the same InkCanvas. In this example, player one and player two each use an individual "inking surface" even though they share the same InkCanvas. This example assumes the click event is connected to the event handler, switchPlayersButton_Click.

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

The following example demonstrates how to bind the Strokes property of an InkCanvas to another InkCanvas.

<InkCanvas Background="LightGray" 
           Canvas.Top="0" Canvas.Left="0" 
           Height="400" Width="200" Name="ic"/>

<!-- Bind the Strokes of the second InkCavas to the first InkCanvas
     and mirror the strokes along the Y axis.-->
<InkCanvas Background="LightBlue"  
           Canvas.Top="0" Canvas.Left="200" 
           Height="400" Width="200" 
           Strokes="{Binding ElementName=ic, Path=Strokes}">
  <InkCanvas.LayoutTransform>
    <ScaleTransform ScaleX="-1" ScaleY="1" />
  </InkCanvas.LayoutTransform>
</InkCanvas>

.NET Framework
Available since 3.0
Return to top
Show: