Skip to main content
Home Forums Silverlight Programming Programming with .NET - General Assign a Storyboard to a Image Inside Datagrid
5 replies. Latest Post by CraigMuckleston on October 21, 2008.
(0)
SixStrings
Member
24 points
19 Posts
10-17-2008 11:49 AM |
Hi ;)
Can anyone give me an example on how to make a storyboard in code an make it run on the Loaded Event of MyImage thats inside the Datagrid?
Thanks in advance
Cheers
<
</
HarshBar...
Star
9908 points
1,719 Posts
10-20-2008 2:26 AM |
Hi,
you can try by creating storyboards in code behind and call its begin method..
rmcsharry
345 points
239 Posts
10-20-2008 11:45 AM |
See this post for example on how to build the storyboard in code:
http://silverlight.net/forums/p/18261/61378.aspx#61378
You can call the storyboard .Begin() method from the Image loaded event.
Richard
CraigMuc...
268 points
131 Posts
10-20-2008 11:56 AM |
Or you can create a storyboard in your App.xaml like this:
Then, in your code behind of you xaml page, call something like this on the images Loaded event
Storyboard.SetTarget(StoryboardResource, _page) ' _page is your xaml page
StoryboardResource.Begin()
10-20-2008 11:59 AM |
Hi Craig,
its really nice code but i think in this we are changing opacity of page .
I think that should be image which has been loaded..
10-21-2008 4:07 AM |
Hi Harsh, It was just an example of a way it could be done.