PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, September 13, 2022

[FIXED] How to animate opacity in Xamarin.Forms

 September 13, 2022     animation, cross-platform, mobile, xamarin, xamarin.forms     No comments   

Issue

I wonder how to Animate opacity of elements visible on screen. For example for Entry I got to this:

this.Animate("", d =>
{
   Debug.WriteLine("anim:" + d);
   Username.Opacity = (AnimationTime - d) / AnimationTime;
}, 0, AnimationTime);

but I wonder if there is easier way. Unfortunately Animate method is poorly documented.


Solution

You could try the FadeTo extension method :-

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/animation/simple#fading

There are other animations that can be applied too :-

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/animation/simple



Answered By - Paul Diston
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing