I'm not able to include a Custom Entry in the axml
file of my page. I'm copying and pasting the code of this tutorial.
Custom Controll:
namespace MyApp
{
public class MyEntry : Entry
{
public MyEntry()
{
BackgroundColor = Color.Gray;
}
}
}
XAML:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:MyApp;assembly=MyApp"
x:Class="MyApp.Teste">
<Label Text="teste" VerticalOptions="Center" HorizontalOptions="Center" />
<local:MyEntry x:Name="Entry" Text="In Shared Code" />
</ContentPage>
App.cs:
MainPage = new Teste();
I'm getting this error:
See Question&Answers more detail:os56:43.847 E/mono ( 3346): Unhandled Exception: 05-06 17:56:43.847 E/mono ( 3346): System.IO.FileNotFoundException: Could not load file or assembly 'MyApp' or one of its dependencies 05-06 17:56:43.847 E/mono ( 3346): File name: 'MyApp' 05-06 17:56:43.847 E/mono ( 3346): at (wrapper dynamic-method) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) 05-06 17:56:43.847 E/mono ( 3346): at (wrapper native-to-managed) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) 05-06 17:56:43.847 E/mono-rt ( 3346): [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'MyApp' or one of its dependencies 05-06 17:56:43.847 E/mono-rt ( 3346): File name: 'MyApp' 05-06 17:56:43.847 E/mono-rt ( 3346): at (wrapper dynamic-method) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) 05-06 17:56:43.847 E/mono-rt ( 3346): at (wrapper native-to-managed) System.Object:99831900-fb04-4a45-85f3-99b1198ac963 (intptr,intptr,intptr) referenceTable GDEF length=670 1