InkInputProcessingConfiguration.RightDragAction Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets how the InkPresenter object handles secondary input from a pen barrel button, pen eraser tip, right mouse button, or similar.
By default, this secondary input is processed as primary input and rendered as an InkStroke (see remarks).
public:
property InkInputRightDragAction RightDragAction { InkInputRightDragAction get(); void set(InkInputRightDragAction value); };
InkInputRightDragAction RightDragAction();
void RightDragAction(InkInputRightDragAction value);
public InkInputRightDragAction RightDragAction { get; set; }
var inkInputRightDragAction = inkInputProcessingConfiguration.rightDragAction;
inkInputProcessingConfiguration.rightDragAction = inkInputRightDragAction;
Public Property RightDragAction As InkInputRightDragAction
Property Value
The input behavior when modified with a secondary affordance.
Examples
Here, we set RightDragAction to LeaveUnprocessed and declare UnprocessedInput event listeners for pointer input.
inkCanvas.InkPresenter.InputProcessingConfiguration.RightDragAction =
InkInputRightDragAction.LeaveUnprocessed;
inkCanvas.InkPresenter.UnprocessedInput.PointerPressed +=
UnprocessedInput_PointerPressed;
inkCanvas.InkPresenter.UnprocessedInput.PointerMoved +=
UnprocessedInput_PointerMoved;
inkCanvas.InkPresenter.UnprocessedInput.PointerReleased +=
UnprocessedInput_PointerReleased;
Here, we define the custom event handlers for pointer input. The handlers are used to implement ink stroke selection.
private void UnprocessedInput_PointerPressed(InkUnprocessedInput sender, Windows.UI.Core.PointerEventArgs args)
{
lasso = new Polyline()
{
Stroke = new SolidColorBrush(Windows.UI.Colors.Blue),
StrokeThickness = 1,
StrokeDashArray = new DoubleCollection() {5, 2},
};
lasso.Points.Add(args.CurrentPoint.RawPosition);
selectionCanvas.Children.Add(lasso);
}
private void UnprocessedInput_PointerMoved(InkUnprocessedInput sender, Windows.UI.Core.PointerEventArgs args)
{
lasso.Points.Add(args.CurrentPoint.RawPosition);
}
private void UnprocessedInput_PointerReleased(InkUnprocessedInput sender, Windows.UI.Core.PointerEventArgs args)
{
lasso.Points.Add(args.CurrentPoint.RawPosition);
boundingRect = inkCanvas.InkPresenter.StrokeContainer.SelectWithPolyLine(lasso.Points);
DrawBoundingRect();
}
Remarks
To pass input as UnprocessedInput through to your app for custom processing, set RightDragAction to LeaveUnprocessed.
Applies to
See also
- Pen and stylus interactions
- Get started: Support ink in your UWP app
- Ink analysis sample (basic) (C#)
- Ink handwriting recognition sample (C#)
- Save and load ink strokes from an Ink Serialized Format (ISF) file
- Save and load ink strokes from the clipboard
- Ink toolbar location and orientation sample (basic)
- Ink toolbar location and orientation sample (dynamic)
- Coloring book sample
- Family notes sample
- Inking sample (JavaScript)
- Simple inking sample (C#/C++)
- Complex inking sample (C++)
- Ink analysis sample