This commit is contained in:
Zihan Chen
2020-12-10 19:59:53 -08:00
parent 832b7f1eb1
commit a69ebe4697
3 changed files with 14 additions and 7 deletions

View File

@@ -106,7 +106,14 @@
<Animation name="RadioButtonTemplateAnimation">
<Gradient ref.Class="sample::RadioButtonTemplateAnimation" Type="sample::RadioButtonTemplateState">
<Interpolation><![CDATA[
[$1]
func (x: double): double
{
var d = 0.1;
if (x < d) { return 0; }
if (x > (1 - d)) { return 0; }
var y = (x - d * 2) * (1 / (1 - d * 2));
if (y < 0.5) { return y * yx * 2; } else { return 0.5 + (y - 0.5) * (y - 0.5) * 2; }
}
]]></Interpolation>
<Targets>
<Target Name="Length"/>
@@ -132,15 +139,15 @@
{
case Normal:
{
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::NormalSelected(), cast UInt64 250);
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::NormalSelected(), cast UInt64 500);
}
case Active:
{
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::ActiveSelected(), cast UInt64 250);
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::ActiveSelected(), cast UInt64 500);
}
case Pressed:
{
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::PressedSelected(), cast UInt64 250);
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::PressedSelected(), cast UInt64 500);
}
}
}
@@ -150,15 +157,15 @@
{
case Normal:
{
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Normal(), cast UInt64 250);
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Normal(), cast UInt64 500);
}
case Active:
{
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Active(), cast UInt64 250);
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Active(), cast UInt64 500);
}
case Pressed:
{
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Pressed(), cast UInt64 250);
newAnimation = animationBuilder.CreateAnimation(RadioButtonTemplateState::Pressed(), cast UInt64 500);
}
}
}