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

TabletPC, InkCanvas - Selectively capture mouse, pen or touch

I need to write a C# WPF application to capture points on tablet PCs and I'm using an InkCanvas, but I don't find a way to selectively configure the InkCanvas to acquire only a combination of mouse, pen and touch points (for my scenario I'd only…
Jhack
  • 510
  • 1
  • 6
  • 20
1
vote
2 answers

How to receive the InkCanvas.StrokeCollected event in the view model

In using MVVM pattern, I have a custom inkcanvas with: protected override void OnStrokeCollected(InkCanvasStrokeCollectedEventArgs e) { CustomStroke newStroke = new CustomStroke(e.Stroke.StylusPoints, e.Stroke.DrawingAttributes); …
Alan Wayne
  • 5,122
  • 10
  • 52
  • 95
1
vote
1 answer

InkCanvas to 2-D Array in WPF

I want to convert all the Strokes in my InkCanvas to 2-dimensional array. It would need to be the same size as InkCanvas is, but filled with information about each pixel(or just boolean value that informs if that pixel was written on) that is…
Azkel
  • 11
  • 3
1
vote
2 answers

In wpf, is there a way to change the inkcanvas background colour in code?

I'm making a small paint program using wpf's inkcanvas and I've been trying to change the background colour in the c# code so the user will be able change it while it's running by adding RGB values. Could anyone give me an example or point me in the…
AGJM13
  • 15
  • 5
1
vote
2 answers

How to programmatically EraseByPoint on an InkCanvas/StrokeCollection?

I am creating a Signal R app that has a drawing section on the UI, right now I am working on the WPF client but there will eventually be a MVC and Android client as well. The drawing events are handled perfectly, but with my method for handling…
user1618236
1
vote
0 answers

Writting on InkCanvas with stylus but not with finger

I have WPF applications running on a Windows8 tablet that captures user writting. I use the InkCanvas control to capture the data but I want the user can only writte with the stylus not the finger. MoreOver, this application can run on a Desktop PC…
Ivan BASART
  • 819
  • 2
  • 11
  • 15
1
vote
1 answer

Get removed elements in InkCanvas

I was wonder if there was any method in which I can access an element which the user removes. For example when the InkCanvas is set to Select users can select elements and press delete to remove them. Is there any way of getting to this item if they…
Nilu
  • 245
  • 1
  • 4
  • 17
1
vote
3 answers

Custom InkCanvas (MSDN Code Sample not working properly)

I want to use custom brushes with the InkCanvas. Their is a code snippet from MSDN. (http://msdn.microsoft.com/en-us/library/ms747347.aspx) If i use that code and move my mouse VERY fast i get space between the brushes(ellipses): And my question…
user140112
1
vote
2 answers

I can't change brush size in SurfaceInkCanvas

I am having difficulties to understand why I can change the brush color but can't change the brush radius in a SurfaceInkCanvas. Here is what I do: Double newSize = Math.Round(BrushRadiusSlider.Value,0); drawingAttributes = new…
user1721413
1
vote
2 answers

WPF, C#, Ink Canvas, Image - How to save inkcanvas on existing image and save it as new image?

I'm trying to make a control where you can paint something on image and save that image with new staff. At the moment I'm using Ink Canvas because it's really useful control, but I couldn't find how to merge it with background image. Moreover, I…
Mantas
  • 85
  • 1
  • 9
1
vote
0 answers

Scaling InkCanvas strokes to fit specific dimensions to crop out unused space

I am attempting to scale an InkCanvas's contents (Strokes) to fit a fixed page size for printing. I want to essentially crop out all of the surrounding whitespace from the InkCanvas, and scale up the Strokes to fit the page while maintaining aspect…
jdhurst
  • 4,365
  • 1
  • 20
  • 21
1
vote
1 answer

WPF InkCanvas - how to determine if it has been "signed"

I'm using a WPF InkCanvas control to capture signatures in a Tablet PC application. One of my requirements is to validate whether or not the application has really been "signed". Right now I'm doing this by checking the Strokes collection of the…
Jason
  • 86,222
  • 15
  • 131
  • 146
1
vote
2 answers

send inkcanvas strokes via sockets

So i am trying to create something like a syncronized paint program by using sockets.I have a server side..and a client side and i am trying to send the inkCollection from the server to the client.This works for simple text, but i cant seem to send…
ALex Popa
  • 339
  • 7
  • 16
0
votes
1 answer

rotating colors?

im trying rotate the colors for a draw feature, any one done someting similar and can help make it look good. byte r = 200; byte g = 100; byte b = 050; private int x = 1; private void timer_elapsed(object sender, EventArgs e) …
Darkmage
  • 1,583
  • 9
  • 24
  • 42
0
votes
1 answer

How to catch the "Delete" keyboard event in InkCanvas, WPF?

There is a InkCanvas control in my application. There are two elements(A and B) in the InkCanvas. And I want to delete A element through the keyboard "Delete". In the processing, I want to use InkCanvas.KeyDown event to catch the "Delete" keyboard…
Nimeux
  • 1