Export (0) Print
Expand All
Key
M11
M12
M21
M22
Tag
Uri
X1
X2
Y1
Y2
Expand Minimize

IsInverted

Silverlight

Gets or sets a value that specifies whether the stylus is inverted.

value = object.IsInverted
object.IsInverted = value

Type: Boolean

true if the stylus is inverted; otherwise, false.

This property is read/write. The default value is false.

An inverted stylus indicates erase mode. Although this property can technically be set, this is of little practical use because the StylusInfo object is merely reporting the real state of the input device.

// Add the new points to the Stroke we're working with
// or delete strokes if we are in erase mode.
function inkPresenterMouseMove(sender, args)
{
    var stylusPoints = args.getStylusPoints(sender);
    
    // Erase Mode?
    if (lastErasePoint != null)
    {
        // Connect the point from previous mouse event
        // to the current collection of stylus points.
        stylusPoints.insert(0, lastErasePoint);
        var hitStrokes = sender.strokes.hitTest(stylusPoints);

        // Remove the strokes that were intersected above.
        for (var i = 0; i < hitStrokes.Count; i++)
        {
          sender.strokes.remove(hitStrokes.getItem(i));
        }
        
        // Update the cached last erase point.
        lastErasePoint = stylusPoints.getItem(stylusPoints.count-1);
    }

    // Ink Mode?
    if (newStroke != null)
    {
        newStroke.stylusPoints.addStylusPoints(stylusPoints);
    }
}

Community Additions

ADD
Show:
© 2014 Microsoft