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
15
votes
4 answers

Why should I use the InkCanvas in WPF?

In my WPF application I have some drawing functionality. I have solved this using a Canvas and handling mouse gestures manually, and I also add the drawn Strokes (wrapped in InkPresenter) to this Canvas. Using Blend I suddenly discover that there…
stiank81
  • 25,418
  • 43
  • 131
  • 202
13
votes
2 answers

How to render InkCanvas to an image in UWP Windows 10 application?

The RenderTargetBitmap class worked with simple Canvas + InkManager (in Windows 8.1) to render ink strokes to an image. UWP introduced InkCanvas and a new Inking API. However, it seems like the RenderTargetBitmap does not work with that. When I try…
mudbox
  • 301
  • 2
  • 7
8
votes
1 answer

Displaying a background image on a UWP ink canvas

I have an InkCanvas in my UWP app, and would like to display an image (ideally as part of the Canvas, but otherwise, overlay it in some way (the idea being that I can save the changed image back to the image file). WPF seems to allow the InkCanvas…
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269
7
votes
2 answers

MVVM Binding to InkCanvas

I seem to have ran into a road block. We are using MVVM with Prism and have a View that requires an Ink Canvas. I've create a StrokeCollection that is being bound from my ViewModel to the View. I am able to set the collection from my viewmodel…
cjibo
  • 4,487
  • 6
  • 27
  • 34
6
votes
2 answers

Why ActualWidth and ActualHeight start from 0,0?

I want to add WPF Path to InkCanvas and use selection to select WPF Path. So, I use this code. System.Windows.Shapes.Path path = drawCanvas.Children[i] as System.Windows.Shapes.Path; …
Hong Lim
  • 133
  • 1
  • 4
  • 12
6
votes
1 answer

How to Erase InkCanvas Strokes in Universal Windows Platform (Windows 10) app?

Working with the InkCanvas control using the Universal Windows Platform (UWP) I can't seem to determine the correct method to erase ink strokes when using the InkCanvas - there's an event "StrokeErased" that can be handled. Ideally the…
RoguePlanetoid
  • 4,516
  • 7
  • 47
  • 64
5
votes
2 answers

how to get directly bitmap image from inkcanvas (in wpf)

I am doing an OCR project. I must to get an image from input in inkcanvas to process in the next step, i.e. translate this image to an two-dimension array. I am confused about that how to get a bitmap image from inkcanvas to process. I have been…
nguyen
  • 171
  • 6
  • 13
5
votes
0 answers

Save UWP Ink Strokes as SVG

Is there a way to save InkStrokes from an UWP InkCanvas as SVG? I already save them in the format 'GifWithEmbeddedIsf', this is good for reloading the ink data in another InkCanvas, but my problem is when I use the Gif to display the Ink Strokes…
5
votes
2 answers

Stopping InkCanvas from resizing while drawing

In my application, I have an InkCanvas with an image in the background. When I draw on the InkCanvas to the bottom or left edge, the InkCanvas changes size to fit the sketch, which messes up the rendering of the image in the background. How do I…
raykendo
  • 620
  • 1
  • 12
  • 25
5
votes
7 answers

saving WPF InkCanvas to a JPG - image is getting cropped

I have a WPF InkCanvas control I'm using to capture a signature in my application. The control looks like this - it's 700x300 However, when I save it as a JPG, the resulting image looks like this, also 700x300 The code I'm using to save …
Jason
  • 86,222
  • 15
  • 131
  • 146
4
votes
2 answers

iOS iPhone finger paint-like app, is there a built-in canvas or open source projects to help me get started?

I need to implement on-screen drawing feature within one of my apps. I would imagine it would be an on-screen transparent overlay. I'm looking to be able to trace the finger path and leave a line, select colors and have erase/undo feature. I did…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
4
votes
3 answers

WPF-InkCanvas StrokeErased event not firing when I used inkcanvas1.Strokes.Erase statement in C#

When I use inkcanvas1.EditingMode is InkCanvasEditingMode.EraseByPoint it is erasing and also StrokeErased event firing. but when I erase stroke through inkcanvas1.Strokes.Erase(); function then StrokeErased event is not firing. then how can I…
Sandeep Jadhav
  • 815
  • 1
  • 10
  • 27
4
votes
1 answer

Erase children of an InkCanvas

I have an InkCanvas on a window in which I allow the user to draw with a stylus, touch, or mouse. I also allow the user to add text. The user taps an "add text" button, then taps where on the canvas they would like their text. A textbox appears…
Ricky Smith
  • 2,379
  • 1
  • 13
  • 29
4
votes
1 answer

InkCanvas Load/Save operations

I've never used InkCanvas control before. What I need is to load up a file into InkCanvas, draw some scribbles and get ther resulting image. And I want to make some additional operations with gotten image. As for saving Correct me if I'm wrong. I've…
lexeme
  • 2,915
  • 10
  • 60
  • 125
4
votes
1 answer

Stop WPF InkBrush from causing a scroll event

The Application I am working on an EHR application. The page I am working on allows for users to draw on a patient's notes using an InkCanvas and InkBrush. When the users use the mouse to draw, everything works perfectly. However, when they use a…
Abhi Tiwari
  • 137
  • 1
  • 6
1
2 3
19 20