How to give the path to animation
hi want give path animation.
i want move circle on outer circle border.
please suggest have to
i'm not sure if easiest way, i'm open constructive critisism...
i've illustrated button inside usercontrol called page, vs default ...
c# code
// setting dependency property
private readonly static dependencyproperty angleproperty = dependencyproperty.register(
typeof(double), typeof(page), new propertymetadata(onvaluechange));
public double angle
{
get{ return (double) this.getvalue(angleproperty);}
set{ this.setvalue(angleproperty,value);}
}
// transforming
private static void onvaluechange(dependencyobject d, dependencypropertychangedeventargs e)
{
usercontrol usercontrol = (usercontrol )d;
double newvalue = (double)e.newvalue;
rotatetransform rotation = new rotatetransform();
rotation.angle = newvalue;
usercontrol.setvalue(usercontrol.rendertransformproperty, rotation);
}
xaml
<button x:name="mybutton">
<storyboard x:name="animationrotate">
<doubleanimation by="20" duration="10" storyboard.targetname="mybutton" storyboard.targetproperty="(mybutton.angle)"></doubleanimation>
</storyboard>
</button>>
i want move circle on outer circle border.
what ?
regards alexander
Silverlight > Getting Started with Silverlight
Comments
Post a Comment