Xamarin Android – How to rebuild Resource.designer.cs

As recently as Xamarin Studio 5.6 (build 273) with Xamarin.Android 4.18.0, if you have manually deleted the Resource.designer.cs file from the project, rebuilding will regenerate Resource.designer.cs, but will not add it back into the project. So after attempting to rebuild once, the file will be present in the file system, but not in the project. … Read more

Xamarin.Forms – InitializeComponent doesn’t exist when creating a new page

UPDATE: This error doesn’t usually appear in VS 2015, if it does, here’s my original answer: Found the solution! Right click on the .XAML file, select Properties. You will see a Property called Custom Tool. Change its value from MSBuild:Compile to MSBuild:UpdateDesignTimeXaml This will solve the problem. Dont know about the downvote, but here’s my … Read more

How to terminate a Xamarin application?

If you are using Xamarin.Forms create a Dependency Service. Interface public interface ICloseApplication { void closeApplication(); } Android : Using FinishAffinity() won’t restart your activity. It will simply close the application. public class CloseApplication : ICloseApplication { public void closeApplication() { var activity = (Activity)Forms.Context; activity.FinishAffinity(); } } IOS : As already suggested above. public … Read more

What is the difference between Xamarin.Forms and Xamarin Native? [closed]

Xamarin.Forms Pros Create one UI for all platforms Use basic components that are available on all platforms (like Buttons, Textfields, Spinners etc.) No need to learn all the native UI frameworks Fast cross platform development process Custom native renderers give you the ability to adjust the appearance and feeling of controls Cons It’s still a … Read more