Showing posts with label live. Show all posts
Showing posts with label live. Show all posts

Wednesday, March 28, 2012

Programmatic Animations

We've got a new app where we are using the Accordian control like the blade interface on XBOX Live and we're building the Accordian control, and adding an updatepanel and adding a UpdatePanelAnimationExtender all programatically from a XML config document. However, I'm not sure how I can add a FadeEffect (http://ajax.asp.net/ajaxtoolkit/Walkthrough/AnimationReference.aspx#FadeAnimation). Here's thw code snippet.

Sean

AjaxControlToolkit.

AccordionPane pane =new AjaxControlToolkit.AccordionPane();

pane.ID = node.Attributes[

"Id"].Value;Label lblHeader =newLabel();

lblHeader.Text = node.Attributes[

"Header"].Value;

pane.HeaderContainer.Controls.Add(lblHeader);

pane.HeaderCssClass = node.Attributes[

"HeaderCss"].Value;

pane.ContentCssClass = node.Attributes[

"ContentCss"].Value;

UpdatePanel updater =newUpdatePanel();

updater.ID =

"updater" + node.Attributes["Id"].Value;

updater.UpdateMode =

UpdatePanelUpdateMode.Conditional;

pane.ContentContainer.Controls.Add(updater);

ProphitAccordion.Panes.Add(pane);

//Since the updater panel is created programatically we'll create our animation for the//updater panels also. Sean

AjaxControlToolkit.

UpdatePanelAnimationExtender upAnima =new AjaxControlToolkit.UpdatePanelAnimationExtender();

upAnima.ID =

"upda" + node.Attributes["Id"].Value;

upAnima.TargetControlID = updater.ID;

AjaxControlToolkit.

Animation updaAnimation =new AjaxControlToolkit.Animation();

updaAnimation.Properties.Add(

"id", ("updaAnimation" + updater.ID));//The following line doesn't work

AjaxControlToolkit.

Animation.FadeEffect upAnFade =new AjaxControlToolkit.Animation.FadeEffect();Hi Sean,

Check outthis post for details on how to dynamically create animations on the server side.

Thanks,
Ted

I know I am a little late to teh party (story of my life), but the link about doesn't work anymore and I am in desperate need of creating animations server side. Different colours for different actions, dynamically created update panels etc. This is about the only subject I can't find any info on, except this one solitary post - and now that's dead.

Wednesday, March 21, 2012

Question on Panels

Hi,
I would like to achieve the look in my app like live.com and pageflakes.com. How can I have multiple panels side by side? Do I just place panels into one table? How do I get them side by side? Do I creat a table with multiple columns and rows and add panels into each sections? Please advice.

Thanks

View->Source and you'll see the HTML they use. Work through to see how it's done. Looks like they will have either a TABLE structure or DIV elements.
Got it! Thanks.