How do i bind "Storyboard.TargetName" in code and XAML? RRS feed

  • Question

  • Such as

    <Storyboard x:Name="ITNews_WaitContent" Completed="ITNews_WaitContent_Completed">

    <DoubleAnimation Duration="0:0:0.1" Storyboard.TargetName="?" Storyboard.TargetProperty="(Opacity)" To="?" />

    ? is what I want to bind.

     Thank you for advance.

    Friday, September 18, 2009 6:58 AM


  • Give your DoubleAnimation a x:name and then use this code to change the property:

     <x:name>.SetValue(Storyboard.TargetNameProperty, "<newTargetName>");

    Friday, September 18, 2009 8:01 AM