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
2
votes
2 answers

WPF InkCanvas: Draw line with DynamicRenderer

I'm writing basic graphic editor in WPF using InkCanvas. I've made some custom shapes (inherited from Stroke). When I draw line wen on InkCanvas, I take first and last point and make a line. That works fine, but now I don't like the default "pen…
Errol Piper
  • 21
  • 1
  • 2
2
votes
4 answers

How to add text to a inkcanvas with code?

I would like to add some text (like a label) on a InkCanvas with WPF in C# code (not Xaml). How is it possible ? thanks Jonathan
user96547
  • 583
  • 10
  • 18
2
votes
1 answer

WPF absolute positioning in InkCanvas

I'm trying to position a rectangle in an InkCanvas. I am using the following method. Unfortunately when I add the rectangle it gets displayed at (0,0). Although when I query to see the whether the left property is 0 I get a non zero values. Does…
Nilu
  • 245
  • 1
  • 4
  • 17
2
votes
1 answer

Is there a generic InkCanvas StrokesChanged type of event?

Essentially what I'm trying to do is trigger a sort of 'dirty' state for my canvas, so that I know if there are unsaved changes. Is there an event in the WPF InkCanvas that I can use to handle any time when the strokes change? If there isn't, what…
Kendall Frey
  • 43,130
  • 20
  • 110
  • 148
2
votes
0 answers

Drawing dynamic number of grid lines on wpf canvas

I have a WPF ink canvas upon which i want to draw grid lines (horizontal and vertical lines representing pixelated canvas). The number of horizontal and vertical lines are going to be dynamic. I have the input i.e. number of those lines in my code…
Priyanka
  • 475
  • 6
  • 17
2
votes
0 answers

InkCanvas Crystal Reports

I have a WPF/MVVM application on .net framework 4.0 using crystal reports 13. On one of the windows, i am using an inkcanvas control to capture signatures. I need to save this in sql server and show on crystal reports. What is the best way of doing…
SoftwareGeek
  • 15,234
  • 19
  • 61
  • 78
2
votes
1 answer

Simulate touch input on Microsoft Surface Window

i am trying to use a Anoto-Pen as a TouchDevice with SurfaceInkCanvas. The pen uses a coordinate-system printed on a sheet of paper to derive its position and this positional data then is send to my application. There i try to transform it to…
me.
  • 21
  • 3
1
vote
3 answers

Selecting polygon on InkCanvas

I have an application where I draw polygons on inkCanvas. I would like to add a function where after clicking one of drawn polygons it would be in editing mode and then I could change some of this proporties for example Fill. I wrote this code but…
Malv20
  • 159
  • 4
  • 11
1
vote
1 answer

Paint on an InkCanvas with finger (touch screen) not mouse - mouseMove instead of MouseClick

I am using an InkCanvas on a Wpf Window (c#). This Canvas is working when I am draging the mouse to the canvas, and then CLICK the mouse to draw what ever I want. I intend to put this on a touch screen. As I unsderstand, the touch on the screen…
Programer
  • 1,005
  • 3
  • 22
  • 46
1
vote
1 answer

Programmatically create InkCanvas Stroke from Path Object

I am trying to convert some scanned handwritten material into InkCanvas for handwriting recognition using InkAnalyser. I already have my handwriting material available in XAML. I have this path (boundary shape of alphabet t) saved in a .XAML file…
user1124695
1
vote
0 answers

WPF InkCanvas unable to Select items when using Touch and EditingMode is select and ParentControl.IsManipulationEnabled=True

My question is how to Select items in InkCanvas using Touch when the parent control and inkcanvas IsManipulationEnable = true. I am experiencing an issue with InkCanvas that will not show the Select adorner and also unable to select item base on the…
j.j. Pita
  • 11
  • 1
  • 3
1
vote
0 answers

UWP drawing over an image and saving to DB

First of all, a disclaimer: I'm pretty new to UWP and C# (I've used C and C++ in the past, but most of my coding experience is in Java, and it has been a few years since I've done any coding with regularity). That said, I'm trying to develop a…
1
vote
2 answers

how to save work done on canvas using InkCanvas to an image file in UWP C#?

I want to save my work done on a canvas in my UWP app. I am using InkCanvas to draw lines on an selected image inside the canvas and I want to save the canvas work to a new image file. I am getting a blank image after trying to save the file. I've…
1
vote
1 answer

how can I copy elements after selected them in inkcanavas

I tried to use Inkcanvas.copy()and Inkcanvas.Paste() but it failed so I save the elements in list and then tried to add them again as a child in the inkcanvas but I got exception error Specified Visual is already a child of another Visual or the…
kartal
  • 17,436
  • 34
  • 100
  • 145
1
vote
1 answer

Render an Image from a StrokeCollection in c#

I need to get an Image from a StrokeCollection, but have no access to the Visual (InkCanvas) itself because of the mvvm structure. Is there possibly an easy way to get this done? XAML:
KilianS
  • 21
  • 7