Search code examples
animationxamarin.formsframe

Frame animation from outside screen and translateto inside screen


I'm new to animation with Xamarin Forms, I have a frame that I need to place it outside the screen like this:

outside

The small frame is outside the device's screen

inside

The small frame now inside the device screen

My problem is I need to know how I can place the frame like that (outside the screen) from the start, and how to know the width and the height of every device so I can use the TranslateTo() method to translate the frame to the exact same position for every device.

Thanks in advance


Solution

  • You can try this from your .cs page

    • Application.Current.MainPage.Width
    • Application.Current.MainPage.Height