Silverlight XAML Primer 14: Using Color Animations: Listing 1: Defining ColorAnimation elements in multiple storyboards.

<Canvas xmlns="http://schemas.microsoft.com/client/2007">
  <Canvas.Resources>
    <Storyboard Name="OverAnimation">
      <ColorAnimation Storyboard.TargetName="tbCanvas" 
        Storyboard.TargetProperty="(Foreground).(Color)" Duration="0:0:0.75" 
        From="Maroon" To="Green" />
    </Storyboard>
    <Storyboard Name="OutAnimation">
      <ColorAnimation Storyboard.TargetName="tbCanvas"
        Storyboard.TargetProperty="(Foreground).(Color)" Duration="0:0:0.75"
        From="Green" To="Maroon" />
    </Storyboard>
  </Canvas.Resources>
  <TextBlock Name="tbCanvas" MouseEnter="OnMouseEnter" 
    MouseLeave="OnMouseLeave"
    Canvas.Left="0" Canvas.Top="80"
    Foreground="Maroon" FontFamily="Verdana" 
    FontSize="24" FontWeight="Bold"
    Text="Hello, From Silverlight!">
  </TextBlock>
</Canvas>
comments powered by Disqus

Featured

  • Developing Agentic Systems in .NET: From Concept to Code

    ZioNet founder Alon Fliess previews his Visual Studio Live! San Diego session on building true agentic systems in .NET -- covering the cognitive loop, MCP tool integration, multi-agent orchestration and enterprise hosting and governance with the Microsoft Agent Framework.

  • Mastering AI Development and Building AI Apps with GitHub Copilot

    Two Microsoft experts explain how GitHub Copilot is evolving from a coding assistant into a broader platform for building, customizing and testing AI-powered developer workflows.

  • VS Code 1.123 Adds Agent Session Sync, 1M Context Windows

    Microsoft released Visual Studio Code 1.123 on June 3, adding agent-focused features, larger model context support, integrated browser updates and a new delay for some automatic extension updates.

  • Copilot Billing Shock Hits Developers

    Developer complaints about GitHub Copilot's new usage-based billing model have centered on unexpectedly rapid AI credit consumption, and neither GitHub nor Microsoft has responded directly to the backlash, though they have previously published guidance to lessen model usage costs.

Subscribe on YouTube