# InkCanvas and Images

**URL:** https://forum.kirupa.com/t/inkcanvas-and-images/274264
**Category:** programming
**Created:** [October 27, 2008, 8:11pm UTC](https://forum.kirupa.com/t/inkcanvas-and-images/274264 "2008-10-27T20:11:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Preafos](https://avatars.discourse-cdn.com/v4/letter/p/9de0a6/32.png) [@Preafos](https://forum.kirupa.com/u/Preafos)
#### Post date: [October 27, 2008, 8:11pm UTC](https://forum.kirupa.com/t/inkcanvas-and-images/274264/1 "2008-10-27T20:11:15Z")

</div>

Hi,

I’m write a application in WPF to display handwritten text and images. For this purpose i choosed the InkCanvas-object.

I finally could add an image to the InkCanvas by adding it as a child to the Children-property. I even could select, scale and move it. But there are some main issues I have to solve.

First of all it is only possible to move the image by selecting the highlighted border, but I want to do the same action by clicking on the object and moving it.

Second the image jumps in a unpredictable direction during a scale process and is not always scaled correctly. (Stretch-property is set to “Uniform” and StrechDirections to “Both”)

The preview scaling frame is not correctlly set to “Uniform”.

Does any one have an idea, how i can solve the first to problems?

Greets,  
Eckhard

PS.: Here is a link to a demo-application: [http://msdn.microsoft.com/en-us/library/aa972135.aspx](http://msdn.microsoft.com/en-us/library/aa972135.aspx)

Just paste the following code into the methode “OnInsertTextBox”:

```
        BitmapImage b = new BitmapImage();

        b.BeginInit();
        b.CreateOptions = BitmapCreateOptions.PreservePixelFormat;
        // This URI have to be an image on your pc
        b.UriSource = new Uri(@"C:	emp\csharp\me.jpg");
        b.DecodePixelWidth = 200;
        b.EndInit();
        
        Image i = new Image();
        i.Source = b;
        inkCanvas.Children.Add(i);
```
