Sl.ayer's lair

It looks like you're writing a blog...

Silverlight, meet Shell.Application

Silverlight 4 is coming, and with it a controversial ability to call local automation objects. In this post, I will review some of the standard automation objects that can be used from Silverlight 4.

Shell.Application

Shell Automation enables access to features of Windows shell. This includes displaying standard dialogs, arranging windows, starting applications, starting and stopping services, and more.

Probably the most useful function of Shell.Application is ShellExecute. Using ShellExecute, it’s possible to run executable or open or print a document.

dynamic shell = ComAutomationFactory.CreateObject("Shell.Application");
shell.ShellExecute("notepad.exe", "", "", "open", 1);

More...


If you’re building a Silverlight application for Facebook, you have two choices: (1) build a stand alone application and use Facebook Connect for authentication, or (2) create a canvas application that will appear on a Facebook site and use the parameters passed to iframe to establish a session. The former is well covered in the Facebook Toolkit documentation, but I couldn’t find any examples of how to embed a Silverlight application within a Facebook iframe. It took a few days worth of research and experiments to get it right and I hope this post will be helpful to anyone who is working on Silverlight canvas application for Facebook.

Embedding Silverlight into Facebook canvas

I know three ways of embedding Silverlight application into a Facebook canvas.Fbss

(1) Select the IFrame option for Render Method in Canvas section of the application settings and embed the Silverlight application inside the iframed page using standard methods (object tag, silverlight.js, etc.).  (2) Use <fb:iframe> tag in fbml based canvas. (3) Use fbml tag <fb:silverlight>. The <fb:silverlight> tag would be the preferred method, but according to the Facebook wiki, the tag is not implemented at this time. That leaves only options 1 and 2 available – embed Silverlight in iframe.  Whether you go with IFrame canvas or use <fb:iframe> tag in fbml, the following steps are the same:

More...


Styled Silverlight buttons

Button

I spent some time recently going through some of my older projects and consolidating different button styles I’ve designed over time into a single project.

You can see the results in this Silverlight sample application.


Comic Composer for Facebook

If you visited my projects page then you know about silverlight comic builder I am working on. Comic Composer for Facebook is the latest development bringing user created comics strips to Facebook platform. I am currently looking for beta testers to help me to prepare application for general release. Please, leave your comments and suggestions in this post.

  • Comic Composer for Facebook
  • Facebook Toolkit
  • Image tools


  • Color picker control for Silverlight

    colorpickr

    I am a bit of a fan of colors and consequently of color pickers. First release of Silverlight didn’t provide much help with control development and my first color picker was very simple: four sliders, one for each of the color components of RGBA color.

    With release of Silverlight 3.0 developers have a choice of the color pickers made by the enthusiasts and companies specializing in Silverlight controls.

    Unfortunately, the only kind of color pickers I could find are based on SV+H model. I figure it is due to Microsoft products favoring that type of color picker. Personally, I prefer HS+V color pickers, commonly used in Adobe products, so I had to sit down and build one myself.

    Color picker was my first custom control and quite expectedly I ran into some issues during development, but it was a good learning experience.

    Color picker is free to use in any projects. Have fun.


    Blog, part deux

    This is my second attempt at starting a blog. First one failed due to the lack of time and technological hoops I had to jump through. I have a good feeling about this time.

    To give this blog a good start I will publish some of the articles I wrote for my old geocities site. I got my first web site building experience thanks to geocities and it is sad to see Yahoo! closing it down, but geocities didn’t evolve with the rest of the web and weak do not survive in the internet jungle.

    And so it begins. Just deux it!