Recommended

  • Silverlight.FX
    Silverlight.FX is a light-weight application framework for building RichInternet Applications with Silverlight 2.
  • Building Modular Silverlight Applications
  • Prism -  10 Things to Know
  • Securing Silverlight Application and WCF Service using ASP.Net Authentication Techniques
  • Model– View – ViewModel in Silverlight
Skip Navigation LinksHome / News / View News

Control a MediaElement Using a Custom Behavior

+ Add to SilverlightShow Favorites
0 comments   /   posted by Silverlight Show on Oct 12, 2009
(0 votes)
Tags: MediaElement , Custom Behaviors
Fons Sonnemans will convince you that controlling a MediaElement in Silverlight isn't a difficult job.

You use the Play(), Stop() and Pause() methods in your code. I have written the 'ControlMediaElementAction' Behavior which makes it even easier. You don't have to write a single line of code. The ControlMediaElementAction is associated with a MediaElement. It has a ControlMediaElementOption which you can set to Play, Stop, Pause and RewindAndPlay. The Invoke() methods controls (Plays, Stops, Pauses and RewindAndPlays) the AssociatedObject (MediaElement).

Share


Comments

Comments RSS RSS
No comments

Add Comment

 
 

   
  
  
   
Please add 4 and 7 and type the answer here: