Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to get relative offset after translation ?

RedRaRedRa Member ✭✭✭

Hi all,

I have been working on some animation and faced with the issue how to get relative offset after translation ?
I do the following translation:

await ComplexButton.MoveHorizontalAnimation(totalX, 250);

And after few steps I what to know the offset at which button located ?

Best Answer

  • RedRaRedRa Member ✭✭✭
    edited March 29 Accepted Answer

    Hi all,

    I have found the answer !!
    There is exists TranslationX property and to get relative translation just call it like this:

    var complexButtonX = ComplexButton.TranslationX;
    

Answers

  • RedRaRedRa Member ✭✭✭
    edited March 29 Accepted Answer

    Hi all,

    I have found the answer !!
    There is exists TranslationX property and to get relative translation just call it like this:

    var complexButtonX = ComplexButton.TranslationX;
    
Sign In or Register to comment.