Search code examples
xamarinwidthxamarin.forms

Get current screen width in xamarin forms


I am creating one Xamarin Forms project and I got stuck in finding the current screen width according to the different device.

I know how it can be done in android and ios but need a way to find the width in portable.


Solution

  • You can try this Application.Current.MainPage.Width in my case this worked and i am able to find the device width in portable project itself.