I have a storyboard and would like to set the attached property VisualStateUtility.InitialState. I\'ve tried various combinations, but the property never gets resolved. >
This should do the trick
Notice how a name is added to the animation, the parentheses are removed from the target property name, which is then prefixed with the xmlns alias from the xaml header.
In your code behind you'll have to add this:
InitializeComponent();
Storyboard.SetTargetProperty(animation, new PropertyPath(Fully.Qualified.Namespace.VisualStateUtility.InitialState));
Apparently this last step is required for animating custom attached properties. A real pain if you'd ask me.