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

C#/WPF Ink Stroke with IsManipulationEnabled?

I'm creating a simple multitouch WPF application with inkcanvas. Right now it is possible to use gestures (zooming, moving, rotating) with images in the inkcanvas, but ink strokes do not have the IsManipulationEnabled property, so the code I made…
user3250740
0
votes
0 answers

How does InkCanvas calculate bezier control points when drawing smooth paths?

InkCanvas in WPF draws very smooth curves when using a touch screen but when using a mouse it looses it's smoothness. Why does InkCanvas use different techniques when using a mouse or a touch screen? To draw a smooth Bezier-curve between points it…
Andreas Zita
  • 7,232
  • 6
  • 54
  • 115
0
votes
0 answers

Display the same UI element in 2 different windows simultaneously

I'm writing a multi screen store application (which means that i control two windows from my application). In the first screen i have an InkCanvas - which the user can draw, and i want the second screen to display the same draw - means: when the…
BreakPoint
  • 93
  • 1
  • 12
0
votes
0 answers

Resizable and Movable Image In WPF InkCanvas

Is there a way in InkCanvas to insert an image that would be movable, selectable and resizable? EDIT: My try: private void AddButton_Click(object sender, RoutedEventArgs e) { Image image = new Image { Width = 100, Source =…
Dracke
  • 651
  • 2
  • 11
  • 30
0
votes
1 answer

InkCanvas and ZIndex

InkCanvas stores all the drawing etc in "Strokes" collection and stores all the controls in "Children". When I draw something then create a TextBox the TextBox remains under the drawing. I can't change its zIndex to bring it forward. Is there a way…
0
votes
1 answer

WPF InkCanvas drawing width/height not consistent in different environments

I have an InkCanvas control that is taking my whole screen. It takes either mouse or touch input for drawing. I have the most basic configuration of InkCanvas and it looks like this: I can…
santahopar
  • 2,933
  • 2
  • 29
  • 50
0
votes
1 answer

Save and load Ink Canvas StrokeCollection to/from stream

I'm trying to serialize an ink canvas in WPF. So I'm using StrokeCollection.Save to save the strokes to a MemoryStream. But when I try to load the stream into the InkCanvas I get an ArgumentException stating "The length of the ISF data must be…
SepehrM
  • 1,087
  • 2
  • 20
  • 44
0
votes
1 answer

Difficulty updating InkPresenter visual after removing strokes?

I am creating an inkcanvas (CustomInkCanvas) that receives Gestures. At different times during its use, I am placing additional panels over different parts of the inkcanvas. All is well, and the part of the CustomInkCanvas that is not covered by…
Alan Wayne
  • 5,122
  • 10
  • 52
  • 95
0
votes
1 answer

Can a mouse tunnel through an InkCanvas?

I have a textblock beneath an InkCanvas. (The textblock is not a child of the InkCanvas). The textblock is created with Inline elements that have attached events like: run.MouseEnter += inline_MouseEnter; run.MouseLeave += inline_MouseLeave; …
Alan Wayne
  • 5,122
  • 10
  • 52
  • 95
0
votes
1 answer

How to use Gestures to change content of a customcontrol?

I'm lost...Back to SO :) The following code correctly displays lines of text through my customcontrol, ccGistaFigure. I am now placing an InkCanvas over the control. Initially, the InkCanvas will be set to recognize Gestures only. What I am trying…
Alan Wayne
  • 5,122
  • 10
  • 52
  • 95
0
votes
0 answers

How to obtain an object beneath a canvas with mouse event in MVVM?

In the following XAML, I am placing an InkCanvas on top of a RichTextBox control. In MVVM style, is there any way of returning the underlying RichTextBox object with the Mouse Events? (This so as to acquire the mouse position and closest word within…
Alan Wayne
  • 5,122
  • 10
  • 52
  • 95
0
votes
0 answers

InkCanvas content to Image and IText

This is the snippet of code I will focus on int Width = (int)InkControl.ActualWidth, Height = (int)InkControl.ActualHeight; InkControl.Background = Brushes.White; var Renderer = new RenderTargetBitmap(Width, Height, 96d, 96d,…
Razlo3p
  • 455
  • 2
  • 7
  • 28
0
votes
2 answers

InkSerializedFormat operation failed on loading bmp into InkCanvas

I try to load bmp file into canvas so I do the following: CanvasStrokeCollection = new StrokeCollection(new FileStream(fileNameFromOpenFileDialog, FileMode.Open, FileAccess.Read)); FileStream opens correctly but when passing it to StrokeCollection…
szaman
  • 6,666
  • 13
  • 53
  • 81
0
votes
1 answer

How to place an image in a control template using visual state manager and storyboards?

I need to place numerous Image controls on an InkCanvas. All of them need to animate when certain code conditions are met. After numerous attempts my ControlTemplate is still not right.
0
votes
1 answer

Wpf Drag an image file format example gif or jpg onto inkcanvas

Question is how to differentiate this 2 image format if i were to drag an jpg image or gif image to inkcanvas? When i run it, i drag my gif image to the inkcanvas but it didnt went to the first condition. It went to the else if. gif is declare on…