Silverlight 3: Using Built-in Behaviors and Triggers to Reduce Code

With the addition of Behaviors in Silverlight 3 we have the opportunity to reduce a lot of the code we write in order to create interactivity within our application. Expressions Blend 3 comes with several built-in behaviors right at your fingertips. You can find them in the Assets panel (left side) under the Behaviors group.

  • ChangePropertyAction
  • ControlStoryboardAction
  • FluidMoveBehavior
  • GoToStateAction
  • HyperlinkAction
  • MouseDragElementBehavior
  • PlaySoundAction
  • RemoveElementAction

In this example we will be building a simplistic sound playing app using the ChangePropertyAction as well as the PlaySoundAction Behaviors. By utilizing these 2 built-in Behaviors we can completely eliminate writing a single line of code.

Published by

Unknown's avatar

Tim Clark

Experienced Business Owner, Chief Information Officer, Vice President, Chief Software Architect, Application Architect, Project Manager, Software Developer, Senior Web Developer, Graphic Designer & 3D Modeler, University Instructor, University Program Chair, Academic Director. Specialties: Ruby, Ruby on Rails, JavaScript, JQuery, AJAX, Node.js, React.js, Angular.js, MySQL, PostgreSQL, MongoDB, SQL Server, Responsive Design, HTML5, XHTML, CSS3, C#, ASP.net, Project Management, System Design/Architecture, Web Design, Web Development, Adobe CS6 (Photoshop, Illustrator)

Leave a comment