tags:

views:

22

answers:

1

Hi,

In Silverlight, how can I make the size of the canvas in a new project larger?

Also, how do I get a specific keyframe from a collection of keyframes via C#? I am sure there is some sort of object with an indexer for this.

Thanks

+1  A: 

If you set the Height and Width of your Canvas to "Auto" then the Canvas should fill the available space, alternatively set them explicitly.

If the problem is that the Silverlight App is not filling the browser then you may need to look at the Object control in the hosting page.

As for the keyframe, you can get the children of a storyboard (TimelineCollection) which will give you the Timelines for the storyboard. If there are keyframes defined they should be in that collection. ie you might have a DoubleAnimationsUsingKeyFrames containing a collection of LinearDoubleKeyFrames.

cheers, Stephen

Stephen Price
Height and Width are by default "Auto".
AnthonyWJones