问题描述
我创建了一个简单的模板,点击该模板可将颜色更改为红色5000ms。
有人知道我是否可以更改它,以便它可以使用Xamarin的动画功能从“默认”缓慢变为“红色”,然后返回?
public class LinkTemplate : Grid
{
public LinkTemplate()
{
TapGestureRecognizer tap2 = new TapGestureRecognizer().BindAction( t =>
t.Tapped += async (s,e) => {
this.BackgroundColor = Color.Red;
await Task.Delay(5000);
this.BackgroundColor = Color.Yellow;
}
);
GestureRecognizers.Add(tap2);
}
}
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)