XAML can be optionally compiled directly into intermediate language (IL) with the XAML compiler (XAMLC). XAMLC offers a number of benefits:
- It performs compile-time checking of XAML, notifying the user of any errors.
- It removes some of the load and instantiation time for XAML elements.
- It helps to reduce the file size of the final assembly by no longer including .xaml files.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms.Xaml; | |
... | |
[assembly: XamlCompilation (XamlCompilationOptions.Compile)] | |
namespace PhotoApp | |
{ | |
... | |
} | |
using Xamarin.Forms.Xaml; | |
... | |
[XamlCompilation (XamlCompilationOptions.Compile)] | |
public class HomePage : ContentPage | |
{ | |
... | |
} |