I'm having some issues on creating a fade in effect of a grid.
I want a grid coming out after a click, is this possible?
Thanks!
I'm having some issues on creating a fade in effect of a grid.
I want a grid coming out after a click, is this possible?
Thanks!
A tad too late to the party, as I just wrote pretty much the same as Hermit Dave, but maybe it helps to contribute to an even better understanding:
Another way is, setting your Storyboard items in XAML view, which, in my opinion, makes it a little cleaner than pure C# code. For this, you can declare within a
<Grid.Resources>
your storyboard, like so:Here, you have declared 2 animations, for collapsing and expanding the targetted control. You can also set a lot of attributes, like start and target values (From, To) and Duration (here it takes 300ms).
In your .cs file, you can execute this by simply calling the method
Just put that into your button_click eventhandler for example. The storyboard is in the System.Windows.Media.Animation namespace.
You can use a Storyboard and animate the Opacity property to produce a Fade In effect, the following thread covers the code required :-
http://social.msdn.microsoft.com/Forums/is/windowsphone7series/thread/a8e05145-364d-412c-8fb5-faf65e80344e
same answer as Paul but i had it open in a project :P took me a while to understand storyboard to give you a sample