Daily Archives: June 4, 2007

Embedding Silverlight Annotation in my dasblog post

This was easier than I expected! Go ahead, draw in my blog post! 🙂

(note – If you do not see the drawing surface it’s because this doesn’t seem to work when the blog post is viewed individually. View my entire Silverlight category and it will be rendered properly. I guess I need to keep working on this one…)

This is the Silverlight setup that I used for my tests on this particular page.

I put the javascript and xaml files in the relative folders in my dasblog application:

thedatafarm.com/blog/xaml

thedatafarm.com/blog/js

Then I added the javascript references that are in the header tags of my html page into the header tags of the homeTemplate.blogtemplate file in my blog/themes/myfavetheme folder.

And it just works!

So far this is just letting you draw on the blog page. My persistence code in the later pages of the above mentioned tests use asp.net ajax and I’d have to do some major customization to my dasblog app to incorporate that right now. I pretty much use dasBlog out of the box, so I’m not ready to go down that road. I have lots of other stuff to learn, but this was a fun little exercise!

 

My Silverlight Ink Experiments: Next Step… try to look like a silverlight application

Inspired by the Scribbler app (part of the Silverlight 1.1 Gallery), written by Daniel Cook  & Pete Blois (with some inspiration from Laurence Moroney)  I decided to spiff up my own drawing application.

Why is it that a black background seems to be the way to make apps look cool?

I even finally opened up Microsoft Expression Blend to help me since I was getting sick of working in raw XAML and having to test each visual change by debugging the app. Last time I looked at this product, it frightened me and I closed it quickly. But now that I have done enough of the hand-coded XAML, it was not a huge leap to comprehend how to use Expression Blend and what I could do with it.

One thing that I discovered is that the Background property of the InkPresenter element, while necessary, is not recognized by the designer. So to do the design in Expression, I had to remove that property, then replace it when I wanted to test out the app.

Since my app is still using the v1.0 of Silverlight (and javascript, not .NET), I can’t pull off the slick color picker that is in the Scribbler app. But when it’s time to move to v1.1, I’ll know where to find the code!