Welcome to Windows Workflow Foundation (WF)
Top Tasks :

WF Team Bloggers

Browse by Tags

All Tags » animation   (RSS)

  • My Screen Saver Vista Sidebar Gadget

     For some reason, I'm drawn to creating things that are just cool while not altogether useful (see my Animated Activity Designer post, though one could argue that it may in fact be useful). To that end, I decided to create a Vista Sidebar gadget that displays a screen saver of your choosing. Vista has some good screen savers that it shipped with and I've embedded screen savers before (in fact, I show how to do it in one of my books).

    So go ahead and grab it from the Windows Live Gallery (link below). If enough people clamor and beg, I will post the source code. Here's a quick rundown of what I did:

    1. Create a .NET User Control
    2. Embed a screen saver in the user control whenever the ScreenSaverPath property is set (and the control is visible)
    3. Create the HTML page for the sidebar (sidebar controls use Javascript and HTML in case you didn't know already)
    4. Embed the UserControl in the HTML page (using COM interop naturally)
    5. Create a settings page that also uses COM Interop. The settings page calls a .NET component that I wrote that simply returns a collection of screen saver paths on the local system.
    6. Create the installation in Javascript. I had to get some help for this one. Basically, I do what regasm does by using the WSHShell object to set registry entries. I found some code on the Internet to help.

    Here's a screenshot of it in action using the Ribbons screensaver:

    Here's the link:

    Screen Saver Vista Sidebar Gadget

  • Stop Motion Animation using Windows Movie Maker

    So I got bored a few nights ago and decided to see if I can do some stop motion animation using my wife's Nikon D70 and Windows Movie Maker. After I imported all the pictures I took of my kids (somewhere around 100) into Windows Movie Maker, I went into options and changed the default time to display pictures in the movie when I drag and drop them. The default is 5 seconds and I changed it to 0.25 seconds. I then did a CTRL-A to select all my pictures and dropped them all on the timeline. I then added a beginning title, transition and end credits. It was topped off with a little music. The whole movie making process took around 5 minutes. So without further ado, here's the link:

    The Amazing Crazy Race

  • Windows workflow foundation animated activity designer source

    As I mentioned in my last post, I have uploaded the Animated Activity Designer for use in your own project. A common question I can anticipate being asked is "Why?". So, here's why I created it and my reason as to why you may want to use something like this.

    First off, the reason I wanted to try to created animated activities within the Windows Workflow designer was merely to see if it was possible. I knew that I could override OnPaint so I pretty much already knew it was going to be possible (otherwise I probably wouldn't have gone down the path). The second reason is simply because as a guy that loves cool eye candy in UI's, I just had to do it.

    So why would you ever want to create an animated activity? Let's say you create an application that hosts the Windows Workflow Designer. Let's also assume that this application is used by your customers. You present them with the designer surface and within a Toolbox like panel, you have your set of custom activities they can use. If pictures are worth a thousand words, then an animation with 10 frames is worth 10,000 words.

    The actual code for this is really simple which is also why it only took a couple of hours to get it up and running. Since it is so easy, I won't waste your time explaining it (but feel free to ping me if you have any questions).

    Download the code right here: AnimatedActivityDesigner.zip

    To see it in action, open the solution in Visual Studio, build it and then open workflow1.cs in the designer.

    Enjoy!

     To see the video better, right click and select Zoom -> Full Screen

    P.S. The activities you see in the project and in the video are simply placeholders. They do not actually do anything.

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us