blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

Julian R Harris, Social Computing Guy

My work blog. Social Computing with Agile Software Delivery. See also my personal blog.

WPF/E: DoubleAnimation doesn't work with Canvas.Left / Top?

Hmm.

This works:

  <Rectangle x:Name="MyAnimatedRectangle" Canvas.Left="100" Canvas.Top ="100" Width="100" Height="100" Fill="Blue">

<DoubleAnimation Storyboard.TargetName="MyAnimatedRectangle" Storyboard.TargetProperty="Width" From="200" To="400" Duration="0:0:3" RepeatBehavior="6"/> 

... but this doesn't:

<DoubleAnimation Storyboard.TargetName="MyAnimatedRectangle" Storyboard.TargetProperty="Canvas.Left" From="200" To="400" Duration="0:0:3" RepeatBehavior="6"/>

 

Both Width and Canvas.Left are properties of Rectangle... so is this a bug? I'd assume so. (It's the same in firefox and explorer 7).
 

Later. Ok I found out why -- the property syntax needs to have brackets around complex statements for some weird reason, so it needs to be (Canvas.Left). That works fine.
 

Published 17 December 2006 15:40 by Julian.RHarris
Filed under: , , ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 
Submit

About Julian.RHarris

Passionate technologist and toolbuilder. Music composer and photographer. Deep fascination and participation in the conversation of how technology can aid people become more empowered.
Powered by Community Server (Personal Edition), by Telligent Systems