Questions tagged [inkcanvas]

An InkCanvas is an element that can be used to receive and display ink input.

An InkCanvas is an element that can be used to receive and display ink input. This is commonly done through the use of a stylus, which interacts with a digitizer to produce ink strokes using a stylus or a mouse. The created strokes are represented as Stroke objects, and can be manipulated either programmatically or based on user input. The InkCanvas enables users to modify or delete an existing Stroke.

The InkCanvas can be bound to a data source. For example, you can bind the Strokes property to: a base-64, encoded string that contains ink data in Ink Serialized format (ISF); or even to the Strokes property of another InkCanvas. You can also bind properties, such as DefaultDrawingAttributes and EditingMode, to other data sources.

source

289 questions
1
vote
1 answer

How to get the fingers count in the InkCanvas?

I am trying to zoom the InkCanvas when the finger counts greater than 1, but I can't get the finger count in the InkCanvas.Anyone Please help me how to get the finger count in InkCanvas.
Santhiya
  • 191
  • 2
  • 14
1
vote
0 answers

How to do the undo and redo operations in the InkCanvas UWP?

I want to do the Undo and Redo operations in the InkCanvas. How to do it? how to get the strokes on the PointerReleasing. I have tried the code path = new InkCanvas() { Height = mImageEditor.imageEditorPanel.ActualHeight, …
Santhiya
  • 191
  • 2
  • 14
1
vote
1 answer

WPF & XAML problem

Im new in WPF & Xaml I dont know how to anchor how to dock... On this screen gray is statusBar is docked but grid and menu is not all components are in canvas. This is XAML…
Irakli Lekishvili
  • 33,492
  • 33
  • 111
  • 169
1
vote
1 answer

How to get scaled UWP inkstroke points?

I have an inkStroke in the inkcanvas, and I use method GetInkPoints to get the points collection of the inkstroke, if the inkcanvas size is 100 * 100 and I want to map the inkstroke to a page to 200*200, then I need to scale the inkstroke, the scale…
newszer
  • 440
  • 1
  • 4
  • 23
1
vote
0 answers

What events are triggered during drawing with stylus using InkCanvas WPF?

I need to know a timestamp of each styluspoint collected in stroke. For further analysis I need coordinates and time of each one of them. Taking timestamp from events seems to be the most sensible solution. However, each time I have got more…
Agnieszka
  • 11
  • 1
1
vote
3 answers

Clear an InkCanvas [UWP]

I want to add a button to my UWP app that removes all the strokes from an InkCanvas, but the suggested method inkCanvas.InkPresenter.Strokes.Clear() isn't recognized as a valid command, is it obsolete or I am doing something else wrong?
Samuele Dassatti
  • 259
  • 3
  • 15
1
vote
1 answer

UWP InkToolbar ToolTip

I'm designing a InkToolbar with InkToolbarCustomToolButton, like below
Vincent
  • 3,124
  • 3
  • 21
  • 40
1
vote
1 answer

How to increase the height or width(through scrolling) for InkCanvas when the user Ink near the end?

I want to increase the height or width(through scrolling) of InkCanvas when the user Ink near the end of the InkCanvas Like OneNote. Solution Tried: I tried ScrollViewer for InkCanvas but It didn't work I thought of re-styling it but I can't find…
Vijay Nirmal
  • 5,239
  • 4
  • 26
  • 59
1
vote
2 answers

InkAnalyzer UWP - custom shapes

Just wondering - is there a way to add custom shape recognition to UWP ink analyzer? I need to be able to recognize a semi-circle, an arrow an couple of other simple shapes. What is the best approach to solve this issue?
Nick Goloborodko
  • 2,883
  • 3
  • 21
  • 38
1
vote
1 answer

How to render InkStroke on Canvas using BezierSegment in UWP C#

I am porting an application from javascript to UWP c# and I am struggling with the new InkCanvas. If you are familiar with the new InkCanvas in UWP, I would truly appreciate your help. This is the code I wrote that takes renders an InkStroke onto a…
ClaudiaWey
  • 167
  • 9
1
vote
1 answer

UWP InkToolbar: How to make eraser types like those in Windows Sketchpad

I want to make eraser types like those in Windows 10 Creators Update Sketchpad , that include not only stroke eraser but also small or large erasers. Currently, the default InkToolbar control only provide stroke eraser, the user can only erase the…
Edi Wang
  • 53
  • 3
1
vote
1 answer

Ho to keep InkCanvas strokes inside InkCanvas in UWP

Consider the following InkCanvas on a UWP app, which is the only element inside a Grid (omitted for conciseness) Draw a stroke which starts somewhere inside the InkCanvas and prolong your…
Octopus
  • 661
  • 4
  • 21
1
vote
1 answer

How to set stroke opacity attribute on InkCanvas in UWP

I tried this, without success: var drawingAttributes = inkCanvas.InkPresenter.CopyDefaultDrawingAttributes(); drawingAttributes.Color =Color.FromArgb(100,0,0,0); inkCanvas.InkPresenter.UpdateDefaultDrawingAttributes(drawingAttributes); The…
Octopus
  • 661
  • 4
  • 21
1
vote
3 answers

Scaling InkStrokes in UWP

I've got a simple demo application that uses an image as the background of an InkCanvas and I scale the strokes when the display of the image is resized so that they remain in the same place relative to the image. Since you can draw -> resize ->…
Rob Spencer
  • 77
  • 1
  • 7
1
vote
0 answers

UWP - load WritableBitmap from byte array returns weird image

I have an InkCanvas drawing, which i convert to WriteableBitmap and set is as an ImageSource as follows: MemoryStream ms = new MemoryStream(); await inkCanvas.InkPresenter.StrokeContainer.SaveAsync(ms.AsOutputStream()); ms.Position =…
J.Doe
  • 326
  • 2
  • 14