Forum Xamarin Xamarin.Forms

Platform specific code (ex. #if __ANDROID__) is grayed out and the VS dropdown menu doesn't help

I'm trying to write platform specific code using #if ANDROID as seen on the image, but as you can see the code inside is grayed out.
I've tried to find for an answer and from what I've understood I should find some options in the dropdown menu that lets me highlight the code depending on the platform, but as you can see this is not the case in my project.
What am I doing wrong? I've created a xamarin.forms mobile app project through visual studio so shouldn't these tools be avaible by default?

Best Answer


Sign In or Register to comment.