Drag and Drop in 30 Seconds

If this doesn’t convince you that it is worthwhile to learn Blend and Behaviors…

  1. Open a new phone project in Blend and drag a shape onto the artboard (e.g., an ellipse).
  2. Click on Assets –> Behaviors and drag  MouseDragElementBehavior onto your shape
  3. There is no step 3.  Run the program.

Note that if you try this with a  Button or other control it won’t work.  But if you put that control inside a Border and then drag MouseDragElementBehavior onto the border, you can then drag the border.

Share

About Jesse Liberty

Jesse Liberty is an independent consultant and programmer with three decades of experience writing and delivering software projects. He is the author of 2 dozen books and multiple Pluralsight courses, and has been a Senior Technical Evangelist for Microsoft, a Distinguished Software Engineer for AT&T, a VP for Information Services for Citibank and a Software Architect for PBS. He is a Xamarin Certified Mobile Developer and a Xamarin MVP, Microsoft MVP and Telerik MVP.
This entry was posted in Blend, Essentials, Mango, Mini-Tutorial and tagged . Bookmark the permalink.

3 Responses to Drag and Drop in 30 Seconds

  1. Moumen says:

    Cool. But that’s just the “Drag” part. How about the “Drop”? 😉

Leave a Reply

Your email address will not be published.