2012年3月28日水曜日

Resize animation with RoundedCorners

I have

<div id="div2" runat="server" style='width: 300px; height: 200px; background-color: teal; position: absolute;'>

and

<cc2:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server">
<cc2:RoundedCornersProperties Radius="10" TargetControlID="div2"></cc2:RoundedCornersProperties>
</cc2:RoundedCornersExtender>

and

<cc2:AnimationProperties TargetControlID="div1">
<Animations><OnHoverOver>
<Resize AnimationTarget="div2" Width="500" Height="400" />
</OnHoverOver></Animations>
</cc2:AnimationProperties>

and when i hover over div1... only width changes. A bug?

Hi MarekG,

This is a consequence of the way that RoundedCorners works. It will wrap your target control in another div and set the height of the new div to be the same. If the inner height changes it won't propogate to the containing wrapper (i.e. you're resizing the wrapped control, but it's overflow is hidden by its wrapper so you see nothing happen).

Right now there isn't a way to work around this - but I hope to make some modifications to the Animation framework on the next release that will allow you to side step the issue.

Thanks,
Ted

0 件のコメント:

コメントを投稿