Drag and drop behavior for Silverlight apps in SketchFlow

I’ve been using the ExpressionBlend 3 SketchFlow trial lately to drum up some Silverlight prototypes. If you’ve seen the videos for SketchFlow, you probably noticed the little bit where he attached a DragDrop behaviour to a listbox and poof! Everything worked!

Well, that was a bit of smoke and mirrors. That behaviour doesn’t ship directly with SketchFlow at all. You can find it in the Snowboarding sample application and drag it into your project directly if you want, but that only works for WPF prototypes.

After hacking around a bunch of things that I would consider bugs in the Silverlight 3.0 SDK, I managed to port this behaviour to Silverlight. So, if you want to drag and drop items between listboxes in your Silverlight SketchFlow app, this one is for you.

Get it here: SilverlightDragDropCopyItem.cs

You just have to drag it into the [blah]Screens folder of your project, and it will show up under Assets -> Behaviors.

Comments (5)

  1. 7:08 am, March 12, 2010janis  / Reply

    Hi

    i download it.. but in the screens folder.. start blend.. but there is no new behavrois.. still get 13 behaviors..

    gr.

  2. 6:37 am, March 15, 2010Debo  / Reply

    Hey dude, as mentioned in the last paragraph of my post here, you actually have to drag the file into the *Screens folder of your SketchFlow project. Only then will it show up in Assets -> Behaviours.

  3. 3:46 pm, March 18, 2010janis  / Reply

    Hi,

    well i download it, put it in the folder SilverlightPrototype3Screens. but still it won’t show up..
    do i need to make a .dll out of it to add it as a reference?

    gr.

  4. 9:24 am, April 22, 2010mark  / Reply

    Hey.

    Just a follow up for those not getting the instructions.

    Download the SilverlightDragDropCopyItem.cs file. Open it and rename the namespace to your correct name of your project screens. In the tutorial it would be “namespace snowboard_onlineScreens”.

    Open the project in Expression Blend 3 or higher and choose the Projects tab. From your file explorer, drag and drop the SilverlightDragDropCopyItem.cs file onto the “screens” section of the project while in Expression Blend. Then rebuild the project to see it show up.

  5. 10:29 am, October 22, 2010Orion  / Reply

    Works great for me. Thanks a ton!

Leave a Reply

Pingbacks (0)

› No pingbacks yet.