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
3
votes
1 answer

Delete rectangle/element in wpf

I draw SQUARE and other shapes in WPF. Like that, private Rect DrawSquare(Rect bounds, InkCanvas canvas) { Rectangle recta = new Rectangle(); recta.Stroke = Brushes.Black; //recta.Fill = Brushes.Blue; …
Tayfun Yaşar
  • 422
  • 2
  • 9
  • 24
3
votes
1 answer

How to draw a free hand shape (random) & text printing on wpf canvas

I am developing a paint application. I am using Canvas control as whiteboard. I want to use InkCanvas kind of functionality in WPF canvas, means I want to draw a free hand shape on Canvas. How can I do this ? I also want to save in as *.JPG Second…
Xyroid
  • 463
  • 5
  • 19
2
votes
1 answer

MouseLeftButtonDown event on InkCanvas

Hi I have no ide why it isn't work. It looks like I can't use this event on InkCanvas. XAML
Malv20
  • 159
  • 4
  • 11
2
votes
0 answers

Loading an image to an ink canvas, editing the image with drawing and then saving the image maintianing the size and resolution

Currently I have a simple application where one button loads an image into an ink canvas as its background; as shown here: private void Button_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog openFileDlg = new…
MC73654
  • 33
  • 3
2
votes
0 answers

WPF-InkCanvas undo operation after performing inkCanvas1.Strokes.Erase()

I have a below code private void inkCanvas1_OnTouchMove(object sender, TouchEventArgs touchEventArgs) { StylusShape EraseShape = (StylusShape)new RectangleStylusShape(20, 20, 0); List enumrator = new List(); TouchPoint…
Sandeep Jadhav
  • 815
  • 1
  • 10
  • 27
2
votes
1 answer

I need OCR for WPF

I need OCR component for InkCanvas control in WPF so I can recognize characters and replaced hand writing one with good one from OCR ?
kartal
  • 17,436
  • 34
  • 100
  • 145
2
votes
2 answers

Moving UWP InkStrokes for Offscreen Rendering

I am capturing InkStrokes and have a need to create a scaled bitmap image of the strokes in the background. The captured images need to be of uniform size regardless of how big the bounding box of the ink. For example, if original ink stroke is…
Jeff Brand
  • 5,623
  • 1
  • 23
  • 22
2
votes
2 answers

How to save and load InkCanvas gif file at fixed location without FilePicker

I want to save and load InkCanvas gif file without FilePicker. I saw a sample using FilePicker, but I want to save the gif file automatically when I click the save button. For example, when I save 1 InkCanvas gif file, Then the gif file is saved at…
Kay
  • 173
  • 14
2
votes
1 answer

Find the coordinates of each point in an InkCanvas

In my UWP app I'm trying to obtain the coordinates of each point that is part of an ink stroke in an InkCanvas, but the official documentation doesn't seem to talk about it, do anyone know how to do this?
Samuele Dassatti
  • 259
  • 3
  • 15
2
votes
1 answer

How to set inktoolbar's pen color

As the code shown, I add a ballpointpen, and it support 30 colors, but not enough. I got colorSelected(Color type) using some other ways, not discuss here. Now I want to click ballpointPen, using my colorSelected to draw. How? Thanks.
Vincent
  • 3,124
  • 3
  • 21
  • 40
2
votes
1 answer

UWP XAML setting bitwise (flag) enum value

I'm looking for a way to set the bitwise (flag) enum values in UWP XAML. The WPF approach (comma separated, "value1,value2,value3") does not seem to work. Any pointers are greatly appreciated! edit 1 It appears comma separated syntax is correct. The…
Nick Goloborodko
  • 2,883
  • 3
  • 21
  • 38
2
votes
1 answer

InkCanvas Strokes are not rendered with proper bounds when switching PC

I have one UWP App using a UWP InkCanvas with a Load and Save Ink Buttons. I made a draw with the app on one laptop, saved the ink as a gif (+embedded isf) and sent the gif file to another laptop with a smaller screen to try it out. When opening…
Octopus
  • 661
  • 4
  • 21
2
votes
0 answers

Is InkCanvas incompatible with Projection transforms?

I am currently developing an UWP application where the user draws some shape freely using the InkCanvas element. At some point I need to flip the whole canvas 180 degrees as if showing the backside of a card. To my surprise, applying a…
glopes
  • 4,038
  • 3
  • 26
  • 29
2
votes
0 answers

How can I get UWP InkCanvas pixel data?

I need to save the pixel data in my project to an array. I tried to use RenderTargetBitmap but it seems it does not work for UWP. What I have got is stroke data, which contains all the points and their location. What I need is an array that…
Tianshu Chu
  • 143
  • 2
  • 8
2
votes
1 answer

OneNote Drawing to InkCanvas in UWP

I want to copy a drawing from OneNote and then paste it into an InkCanvas in my UWP App programmatly. Currently I'm using StrokeContainer.PasteFromClipboard(new Point(0, 0)) with Data from the OneNote2016 Application. But is there a way to get the…
Maximilian K.
  • 227
  • 4
  • 16
1 2
3
19 20