Ink API In WPF

I just started to develop a fascination with the Ink API after getting Vista the other day. So I thought about it and decided to create a WPF application which uses Ink to create a very simple paint like application. The finished product looked like this:

main1.png

This app uses the WPF InkCanvas control.

The full article is published here, but just as a taster it can do the following :

* Saving Ink
* Saving Ink as a bitmap
* Loading Ink
* Cut Ink
* Copy Ink
* Paste Ink
* Delete Ink
* Select Ink
* Format Ink
* Stylus Color
* Change stylus type
* Change pen

An example of the some Ink being selected is as follows:

cut.png

I also created another window where you can select the new DrawingAttributes that are applied to the Ink.

stylus.png

Advertisements

2 thoughts on “Ink API In WPF

  1. Dave says:

    Hi Sacha. First great blog entry. I too am playing with ink and have an almost identical app.

    My question then have you considered how to add shapes to ink. Not through canvas.Children.Add but actually as ink StylusPoints. Would you have any idea how to do it?

    I can add an ellipse ( as a child ) I can draw an ellipse freehand (a wobbly ellipse anyway) but I would like to add an ellipse “button” that I could drag onto a canvas.

  2. sacha says:

    To be honest the only way that I have seen to actually add shapes is the way in which you mentioned.

    My initial investigation lead me down that path, and I too got that working, but never got to the point where I could add an ellipse using a “button” that I could drag onto a canvas.

    Sorry to say that, but its all I could do also.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: