Silverlight XAML Primer 14: Using Color Animations: Listing 2: Finding and playing storyboards based on user interaction with a Silverlight Canvas.

Color animations provide yet another tool that you can use to enhance a user interface and perform a variety of interesting effects.

function CreateSilverlight()
      parentElement: document.getElementById('divSilverlight'),
      id: 'slControl',
      properties: {
         width: '500',
         height: '500',
            isWindowless: 'false',
         version: '1.0'
      events: {
          onError: null,
          onLoad: OnLoad
      context: null 

var slControl = null;

function OnLoad(control, context, rootElement)
    slControl = control;

function OnMouseEnter(sender,args)
    var animation = slControl.Content.FindName("OverAnimation");

function OnMouseLeave(sender,args)
    var animation = slControl.Content.FindName("OutAnimation");
comments powered by Disqus
Upcoming Events

.NET Insight

Sign up for our newsletter.

I agree to this site's Privacy Policy.